{"action":"opened","issue":{"url":"https://api.github.com/repos/puppetlabs/beaker-rspec/issues/59","labels_url":"https://api.github.com/repos/puppetlabs/beaker-rspec/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/puppetlabs/beaker-rspec/issues/59/comments","events_url":"https://api.github.com/repos/puppetlabs/beaker-rspec/issues/59/events","html_url":"https://github.com/puppetlabs/beaker-rspec/issues/59","id":59656915,"number":59,"title":"having error finding my class using beaker","user":{"login":"developerinlondon","id":92697,"avatar_url":"https://avatars.githubusercontent.com/u/92697?v=3","gravatar_id":"","url":"https://api.github.com/users/developerinlondon","html_url":"https://github.com/developerinlondon","followers_url":"https://api.github.com/users/developerinlondon/followers","following_url":"https://api.github.com/users/developerinlondon/following{/other_user}","gists_url":"https://api.github.com/users/developerinlondon/gists{/gist_id}","starred_url":"https://api.github.com/users/developerinlondon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/developerinlondon/subscriptions","organizations_url":"https://api.github.com/users/developerinlondon/orgs","repos_url":"https://api.github.com/users/developerinlondon/repos","events_url":"https://api.github.com/users/developerinlondon/events{/privacy}","received_events_url":"https://api.github.com/users/developerinlondon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-03T15:26:00Z","updated_at":"2015-03-03T15:26:00Z","closed_at":null,"body":"hi there,\r\n\r\ni am using the example from the beaker-rspec and having problems finding my class. \r\n\r\nhere is my error:\r\n```\r\n[/Users/nayeem.syed/Documents/bgch/puppet-installer:feature/add-resolv-conf:d62c707:+I+M+U]$ rspec spec/acceptance/bgch_bastion_rspec.rb \r\nBeaker::Hypervisor, found some vagrant boxes to create\r\n==> ubuntu-server-1404-x64: Forcing shutdown of VM...\r\n==> ubuntu-server-1404-x64: Destroying VM and associated drives...\r\nBringing machine 'ubuntu-server-1404-x64' up with 'virtualbox' provider...\r\n==> ubuntu-server-1404-x64: Importing base box 'puppetlabs/ubuntu-14.04-64-nocm'...\r\n==> ubuntu-server-1404-x64: Matching MAC address for NAT networking...\r\n==> ubuntu-server-1404-x64: Checking if box 'puppetlabs/ubuntu-14.04-64-nocm' is up to date...\r\n==> ubuntu-server-1404-x64: Setting the name of the VM: defaultyml_ubuntu-server-1404-x64_1425394474386_17455\r\n==> ubuntu-server-1404-x64: Clearing any previously set network interfaces...\r\n==> ubuntu-server-1404-x64: Preparing network interfaces based on configuration...\r\n    ubuntu-server-1404-x64: Adapter 1: nat\r\n    ubuntu-server-1404-x64: Adapter 2: hostonly\r\n==> ubuntu-server-1404-x64: Forwarding ports...\r\n    ubuntu-server-1404-x64: 22 => 2222 (adapter 1)\r\n==> ubuntu-server-1404-x64: Running 'pre-boot' VM customizations...\r\n==> ubuntu-server-1404-x64: Booting VM...\r\n==> ubuntu-server-1404-x64: Waiting for machine to boot. This may take a few minutes...\r\n    ubuntu-server-1404-x64: SSH address: 127.0.0.1:2222\r\n    ubuntu-server-1404-x64: SSH username: vagrant\r\n    ubuntu-server-1404-x64: SSH auth method: private key\r\n    ubuntu-server-1404-x64: Warning: Connection timeout. Retrying...\r\n==> ubuntu-server-1404-x64: Machine booted and ready!\r\n==> ubuntu-server-1404-x64: Checking for guest additions in VM...\r\n==> ubuntu-server-1404-x64: Setting hostname...\r\n==> ubuntu-server-1404-x64: Configuring and enabling network interfaces...\r\n==> ubuntu-server-1404-x64: Mounting shared folders...\r\n    ubuntu-server-1404-x64: /vagrant => /Users/nayeem.syed/Documents/bgch/puppet-installer/.vagrant/beaker_vagrant_files/default.yml\r\nAllocated a PTY on 10.255.44.172 for \"sudo su -c \\\"cp -r .ssh /root/.\\\"\"\r\nAllocated a PTY on 10.255.44.172 for \"sudo su -c \\\"sed -ri 's/^#?PermitRootLogin no|^#?PermitRootLogin yes/PermitRootLogin yes/' /etc/ssh/sshd_config\\\"\"\r\nAllocated a PTY on 10.255.44.172 for \"sudo su -c \\\"service ssh restart\\\"\"\r\nlocalhost $ scp /Users/nayeem.syed/Documents/bgch/puppet-installer/modules/bgch_bastion ubuntu-server-1404-x64:/etc/puppetlabs/puppet/modules/bgch_bastion {:ignore => [\".bundle\", \".git\", \".idea\", \".vagrant\", \".vendor\", \"vendor\", \"acceptance\", \"bundle\", \"spec\", \"tests\", \"log\", \".\", \"..\"]}\r\n\r\nbgch_bastion class\r\n  running puppet code\r\nlocalhost $ scp /var/folders/cg/j_8tw58n60nc098k36yfvwvm000120/T/beaker20150303-25498-7dl2fx ubuntu-server-1404-x64:/tmp/apply_manifest.pp.kVqx1G {:ignore => }\r\n    should work with no errors (FAILED - 1)\r\nDestroying vagrant boxes\r\n==> ubuntu-server-1404-x64: Forcing shutdown of VM...\r\n==> ubuntu-server-1404-x64: Destroying VM and associated drives...\r\n\r\nFailures:\r\n\r\n  1) bgch_bastion class running puppet code should work with no errors\r\n     On host ``\r\n     Failure/Error: apply_manifest(pp, :catch_failures => true)\r\n     Beaker::Host::CommandFailure: Host 'ubuntu-server-1404-x64' exited with 1 running:\r\n puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.kVqx1G\r\nLast 10 lines of output were:\r\n\tWarning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations\r\n\t   (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')\r\n\tInfo: Loading facts\r\n\tError: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class bgch_bastion at /tmp/apply_manifest.pp.kVqx1G:1 on node ubuntu-server-1404-x64\r\n\tWrapped exception:\r\n\tCould not find declared class bgch_bastion\r\n\tError: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class bgch_bastion at /tmp/apply_manifest.pp.kVqx1G:1 on node ubuntu-server-1404-x64\r\n       \r\n       Host 'ubuntu-server-1404-x64' exited with 1 running:\r\n        puppet apply --verbose --detailed-exitcodes /tmp/apply_manifest.pp.kVqx1G\r\n       Last 10 lines of output were:\r\n       \tWarning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations\r\n       \t   (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning')\r\n       \tInfo: Loading facts\r\n       \tError: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class bgch_bastion at /tmp/apply_manifest.pp.kVqx1G:1 on node ubuntu-server-1404-x64\r\n       \tWrapped exception:\r\n       \tCould not find declared class bgch_bastion\r\n       \tError: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class bgch_bastion at /tmp/apply_manifest.pp.kVqx1G:1 on node ubuntu-server-1404-x64\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/host.rb:290:in `exec'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/dsl/helpers.rb:88:in `block in on'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/shared/host_manager.rb:95:in `run_block_on'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/dsl/patterns.rb:32:in `block_on'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/dsl/helpers.rb:78:in `on'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/dsl/helpers.rb:953:in `block in apply_manifest_on'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/shared/host_manager.rb:95:in `run_block_on'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/dsl/patterns.rb:32:in `block_on'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/dsl/helpers.rb:882:in `apply_manifest_on'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/beaker-2.5.0/lib/beaker/dsl/helpers.rb:960:in `apply_manifest'\r\n     # ./spec/acceptance/bgch_bastion_rspec.rb:11:in `block (3 levels) in <top (required)>'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:116:in `block in run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:248:in `with_around_each_hooks'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example.rb:113:in `run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:515:in `block in run_examples'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `map'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:511:in `run_examples'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:496:in `run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:497:in `block in run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:497:in `map'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/example_group.rb:497:in `run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block (2 levels) in run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `map'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:24:in `block in run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/reporter.rb:58:in `report'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:21:in `run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in `run'\r\n     # /Users/nayeem.syed/gems/ruby/2.1.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'\r\n\r\nFinished in 14.42 seconds\r\n1 example, 1 failure\r\n\r\nFailed examples:\r\n\r\nrspec ./spec/acceptance/bgch_bastion_rspec.rb:5 # bgch_bastion class running puppet code should work with no errors\r\n\r\n```\r\n\r\nhere is my spec file:\r\n```\r\nrequire 'spec_helper_acceptance'\r\n\r\ndescribe 'bgch_bastion class' do\r\n  describe 'running puppet code' do\r\n    it 'should work with no errors' do\r\n      pp = <<-EOS\r\n        class { 'bgch_bastion': }\r\n      EOS\r\n\r\n      # Run it twice and test for idempotency\r\n      apply_manifest(pp, :catch_failures => true)\r\n      expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero\r\n    end\r\n\r\n  end\r\nend\r\n```\r\n\r\nand here is the spec_helper_acceptance.rb:\r\n```\r\nrequire 'beaker-rspec'\r\nrequire 'pry'\r\n\r\nhosts.each do |host|\r\n  # Install Puppet\r\n  on host, install_puppet\r\n  on hosts, \"mkdir -p #{host['distmoduledir']}\"\r\nend\r\n\r\nRSpec.configure do |c|\r\n  module_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))\r\n  module_name = module_root.split('/').last\r\n\r\n  c.formatter = :documentation\r\n\r\n  # Configure all nodes in nodeset\r\n  c.before :suite do\r\n    # Install module\r\n#    puppet_module_install(:source => module_root, :module_name => module_name)\r\n    puppet_module_install(:source => \"#{module_root}/modules/bgch_bastion\", :module_name => 'bgch_bastion')\r\n    \r\n    hosts.each do |host|\r\n      shell(\"/bin/touch #{default['puppetpath']}/hiera.yaml\")\r\n      on host, puppet('module','install','puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }\r\n\r\n #     binding.pry\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nWhen i try enabling pry like mentioned on the doc I get the error below:\r\n```\r\n[1] pry(#<RSpec::Core::ExampleGroup>)> hosts\r\nNoMethodError: undefined method `process_line' for #<SpecInfra::Command::Ubuntu:0x007faba537bee8>\r\nfrom /Users/nayeem.syed/gems/ruby/2.1.0/gems/pry-0.10.1/lib/pry/pry_instance.rb:404:in `process_command'\r\n```\r\n\r\nany ideas why i am having this problem... it seems quite straightforward on the doc but not quite working. \r\nI tried asking around on #puppet-dev irc with no luck either... :-("}}