New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capybara::RSpecMatchers::HaveText implements a legacy RSpec matcher with rspec 3.0.0.beta2 #1254

Closed
Goltergaul opened this Issue Feb 19, 2014 · 14 comments

Comments

Projects
None yet
8 participants
@Goltergaul

Goltergaul commented Feb 19, 2014

I'm using expect(page).to have_content 'Success' in a request spec and that produces the following deprecation warning from rspec 3.0.0.beta2:

Deprecation Warnings:

Capybara::RSpecMatchers::HaveText implements a legacy RSpec matcher
protocol. For the current protocol you should expose the failure messages
via the failure_message and failure_message_when_negated methods.

If you need more of the backtrace for any of these deprecations to
identify where to make the necessary changes, you can configure
config.raise_errors_for_deprecations!, and it will turn the
deprecation warnings into errors, giving you the full backtrace.

@abotalov

This comment has been minimized.

Show comment
Hide comment
@abotalov

abotalov Feb 19, 2014

Collaborator

See #1219

Collaborator

abotalov commented Feb 19, 2014

See #1219

@Goltergaul

This comment has been minimized.

Show comment
Hide comment
@Goltergaul

Goltergaul Feb 19, 2014

ah didn't find this one. thanks

Goltergaul commented Feb 19, 2014

ah didn't find this one. thanks

@ashour

This comment has been minimized.

Show comment
Hide comment
@ashour

ashour Feb 27, 2014

Hey, I'm on rspec 3.0.0beta2 and capybara 2.2.1 and still getting this issue. My impression is that this PR was pulled. Are the warnings still expected behaviour? If so, any workarounds?

ashour commented Feb 27, 2014

Hey, I'm on rspec 3.0.0beta2 and capybara 2.2.1 and still getting this issue. My impression is that this PR was pulled. Are the warnings still expected behaviour? If so, any workarounds?

@abotalov

This comment has been minimized.

Show comment
Hide comment
@abotalov

abotalov Feb 27, 2014

Collaborator

@ashour You get those warnings because Capybara version that includes this change hasn't been released yet.

Collaborator

abotalov commented Feb 27, 2014

@ashour You get those warnings because Capybara version that includes this change hasn't been released yet.

@ashour

This comment has been minimized.

Show comment
Hide comment
@ashour

ashour Feb 27, 2014

@abotalov I see. Is there any way to suppress the warnings for the time being?

ashour commented Feb 27, 2014

@abotalov I see. Is there any way to suppress the warnings for the time being?

@ncri

This comment has been minimized.

Show comment
Hide comment
@ncri

ncri Mar 13, 2014

@ashour you could link to the github repo in your gemfile for now

ncri commented Mar 13, 2014

@ashour you could link to the github repo in your gemfile for now

@palfvin

This comment has been minimized.

Show comment
Hide comment
@palfvin

palfvin Apr 4, 2014

@ncri Where are you suggesting we pull from to work around this? Capybara's master branch is still at version 2.2.0. Does it contain the fix?

palfvin commented Apr 4, 2014

@ncri Where are you suggesting we pull from to work around this? Capybara's master branch is still at version 2.2.0. Does it contain the fix?

@twalpole

This comment has been minimized.

Show comment
Hide comment
@twalpole

twalpole Apr 4, 2014

Collaborator

@palfvin Yes this was pulled into master -- we are still working on full RSpec 3 compatibility, I hope to release a new gem within the next 2 weeks

Collaborator

twalpole commented Apr 4, 2014

@palfvin Yes this was pulled into master -- we are still working on full RSpec 3 compatibility, I hope to release a new gem within the next 2 weeks

ACEfanatic02 added a commit to ACEfanatic02/scheduler that referenced this issue Apr 11, 2014

Fix capybara / rspec deprecation errors.
Pulling the master branch of the capybara gem now. More information here:
teamcapybara/capybara#1254
@cupakromer

This comment has been minimized.

Show comment
Hide comment
@cupakromer

cupakromer May 19, 2014

Any updates on when a new capybara gem version will be released?

cupakromer commented May 19, 2014

Any updates on when a new capybara gem version will be released?

@twalpole

This comment has been minimized.

Show comment
Hide comment
@twalpole

twalpole May 19, 2014

Collaborator

@cupakromer I had wanted to get one out by now - but then life got in the way. Hopefully end of this week - more likely end of next week.

Collaborator

twalpole commented May 19, 2014

@cupakromer I had wanted to get one out by now - but then life got in the way. Hopefully end of this week - more likely end of next week.

@cupakromer

This comment has been minimized.

Show comment
Hide comment
@cupakromer

cupakromer May 19, 2014

Sounds good. rspec just cut all of the 3.0.0.rc1 versions. I feel more projects will try out RC1 than the betas. So they'll likely see lots of these messages filling up the output.

cupakromer commented May 19, 2014

Sounds good. rspec just cut all of the 3.0.0.rc1 versions. I feel more projects will try out RC1 than the betas. So they'll likely see lots of these messages filling up the output.

@puyo

This comment has been minimized.

Show comment
Hide comment
@puyo

puyo Jun 23, 2014

rspec 3 is out! Time to fix this one?

puyo commented Jun 23, 2014

rspec 3 is out! Time to fix this one?

@twalpole

This comment has been minimized.

Show comment
Hide comment
@twalpole

twalpole Jun 23, 2014

Collaborator

I believe this was fixed in 2.3

Collaborator

twalpole commented Jun 23, 2014

I believe this was fixed in 2.3

@puyo

This comment has been minimized.

Show comment
Hide comment
@puyo

puyo Jun 23, 2014

You're totally right. Sorry. I had a version constraint in a Gemfile... it's a long story. :)

puyo commented Jun 23, 2014

You're totally right. Sorry. I had a version constraint in a Gemfile... it's a long story. :)

soramugi added a commit to soramugi/paperclip that referenced this issue Dec 12, 2014

Legacy RSpec matcher to version up
    bundle exec rake cucumber

to log

```
Capybara::RSpecMatchers::HaveText implements a legacy RSpec matcher
protocol. For the current protocol you should expose the failure messages
via the failure_message and failure_message_when_negated methods.
```

See
teamcapybara/capybara#1254
teamcapybara/capybara#1219

yoshihara added a commit to fluent/fluentd-ui that referenced this issue Apr 2, 2015

Update capybara ~> 2.4.0 to surpress warning
The below warning was surpressed by the newest capybara.
 c.f. teamcapybara/capybara#1254

Warning:
--------------------------------------------------------------------------------
Capybara::RSpecMatchers::HaveText implements a legacy RSpec matcher
protocol. For the current protocol you should expose the failure messages
via the `failure_message` and `failure_message_when_negated` methods.
(Used from /Users/yoshihara/everyleaf/fluentd-ui/spec/features/fluentd/setting/running_backup_spec.rb:43:in `block (6 levels) in <top (required)>')
--------------------------------------------------------------------------------

yoshihara added a commit to fluent/fluentd-ui that referenced this issue Apr 2, 2015

Update capybara ~> 2.4.0 to surpress warning
refs #161

The below warning was surpressed by the newest capybara.
 c.f. teamcapybara/capybara#1254

Warning:
--------------------------------------------------------------------------------
Capybara::RSpecMatchers::HaveText implements a legacy RSpec matcher
protocol. For the current protocol you should expose the failure messages
via the `failure_message` and `failure_message_when_negated` methods.
(Used from /Users/yoshihara/everyleaf/fluentd-ui/spec/features/fluentd/setting/running_backup_spec.rb:85:in `block (6 levels) in <top (required)>')
--------------------------------------------------------------------------------

And specs are all green :)

jyurek pushed a commit to thoughtbot/paperclip that referenced this issue Apr 24, 2015

Legacy RSpec matcher to version up
    bundle exec rake cucumber

to log

```
Capybara::RSpecMatchers::HaveText implements a legacy RSpec matcher
protocol. For the current protocol you should expose the failure messages
via the failure_message and failure_message_when_negated methods.
```

See
teamcapybara/capybara#1254
teamcapybara/capybara#1219

boddhisattva added a commit to boddhisattva/expenses that referenced this issue Nov 1, 2015

Updates Capybara gem to overcome deprecation warnings
One can read more about these warnings as part of the github issue -
teamcapybara/capybara#1254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment