Skip to content
This repository has been archived by the owner on Feb 13, 2020. It is now read-only.

Rspec 2 support #61

Closed
kidpollo opened this issue Apr 6, 2012 · 10 comments
Closed

Rspec 2 support #61

kidpollo opened this issue Apr 6, 2012 · 10 comments

Comments

@kidpollo
Copy link

kidpollo commented Apr 6, 2012

I am getting this error

The stack trace seems to indicate tour gem do es not work for rspec 2 am i right?

/Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/sauce-1.0.2/lib/sauce/integrations.rb:122:in `block in <module:SeleniumExampleGroup>': undefined method `settings' for #<RSpec::Core::Configuration:0x007feec590ba30> (NoMethodError)
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:24:in `call'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:24:in `call'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:37:in `run_in'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `block in run_all'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `each'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:70:in `run_all'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/hooks.rb:368:in `run_hook'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:27:in `block in run'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/reporter.rb:34:in `report'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/command_line.rb:25:in `run'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:80:in `run_in_process'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:69:in `run'
    from /Users/pair/.rvm/gems/ruby-1.9.2-p290@gronkowski/gems/rspec-core-2.8.0/lib/rspec/core/runner.rb:10:in `block in autorun'
@rtyler
Copy link
Contributor

rtyler commented Apr 6, 2012

I'm working on cleaning up a lot of the integrations code (the top of that stacktrace is the file I'm working on). Do you have a sample spec that I could see to help give me an idea of how you're using the gem?

@bbonamin
Copy link

Hey guys, we're having the exact same problem with this gem when trying to execute the 'rspec' command. We have a Rails app alongside a ruby application that uses selenium webdriver with the sauce_ruby gem. If we add the sauce_ruby gem to the test environment in the Rails Gemfile, we get the error described above.

@estahn
Copy link

estahn commented May 17, 2012

Is the sauce gem useable with Rspec 2 at all?

@rtyler
Copy link
Contributor

rtyler commented May 17, 2012

I don't know why it wouldn't work, but I don't have a lot of good examples to work with yet :-/

Got some sample code I could look at?

@ghost ghost assigned rtyler May 27, 2012
@rtyler
Copy link
Contributor

rtyler commented May 27, 2012

I tried to reproduce this with what I know about the RSpec integration, and have created a reproduction repository here which does not reproduce your issue.

See the following transcript:

-> % bundle exec rspec -c -f d
[DEPRECATED] This method (browser_url=) is deprecated, please use the [] and []= accessors instead
[DEPRECATED] This method (browsers=) is deprecated, please use the [] and []= accessors instead
[DEPRECATED] This method (application_host) is deprecated, please use the [] and []= accessors instead

The Sauce Labs website
[DEPRECATED] This method (browser_url) is deprecated, please use the [] and []= accessors instead
[DEPRECATED] This method (capture_traffic?) is deprecated, please use the [] and []= accessors instead
  should have a home page

Finished in 33.76 seconds
1 example, 0 failures

It should be mentioned that this is with RSpec 2.10.0.

Does this reproduction case not look like your local set up? If not, what should be changed to reproduce this issue?

@ghost
Copy link

ghost commented May 31, 2012

I am seeing the same error the op saw. First time using the sauce gem. I also have rspec 2.10.0, although I am not including it directly, it's being pulled in by 'rspec-rails'.

However, the approach you list of
bundle exec rspec -c -f d
is not the same as the instructions on the main github page for this gem, which suggests:
rake rspec:selenium:sauce

By googling around, it seems that similar errors have been due to include/require collisions.

@rtyler
Copy link
Contributor

rtyler commented Aug 2, 2012

I believe I've deprecated the selenium:sauce Rake task in the most recent (2.0) release of the Sauce gem. I'd be interested to know whether it's worth bringing back more "official" support for RSpec-based browser tests

@rtyler
Copy link
Contributor

rtyler commented Aug 15, 2012

With the addition of peripheral gems in the 2.1 release, I think it now makes sense to create a sauce-rspec gem which creates a good "default workflow" for RSpec users.

I may or may not create a separate ticket for that, but either way, I'd like to throw the old (bad) RSpec support out the window entirely and start fresh!

@rtyler
Copy link
Contributor

rtyler commented Sep 5, 2012

I've created a new ticket (#91) to track the work on creating a new sauce-rspec gem to provide good and reasonable support for RSpec/Capybara usage.

I don't think GitHub allows you to add yourself as a watcher to a ticket without commenting on it, so please add a silly comment to #91 to track its progress :)

@rtyler rtyler closed this as completed Sep 5, 2012
@hjdivad
Copy link

hjdivad commented Sep 5, 2012

@rtyler that was true until recently. Under the comment area you can see a dropdown for thread notifications and subscribe to tickets without commenting.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants