Skip to content
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

Add more RSpec aliases #1624

Merged
merged 1 commit into from
Dec 21, 2015
Merged

Add more RSpec aliases #1624

merged 1 commit into from
Dec 21, 2015

Conversation

Bartuz
Copy link
Contributor

@Bartuz Bartuz commented Dec 15, 2015

Introducing xfeature, ffeature and fscenario

@@ -21,9 +23,12 @@ def self.included(base)
alias :background :before
alias :scenario :it
alias :xscenario :xit
alias :fscenario :fit
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Bartuz
Copy link
Contributor Author

Bartuz commented Dec 15, 2015

How does the test output look like:
test_output

@Bartuz
Copy link
Contributor Author

Bartuz commented Dec 16, 2015

Only Ruby 1.9.3 build (the second one? there are two builds on 1.9.3) fails. https://travis-ci.org/jnicklas/capybara/jobs/96986194
with message:

NoMethodError: undefined method `exclude_pattern=' for #<RSpec::Core::RakeTask:0x000000015f71b0`

Any assistance?

@twalpole
Copy link
Member

As a guess RSpec 2.2 doesn't support exclude_pattern= -- don't break out these tests into a separate task and just test for the metadata in the test rather than that true == true.

@in_filtered_hook = true
end

ffeature "if ffeature alises focused tag then" do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spelling - aliases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😿

@twalpole twalpole changed the title Add missing RSpec aliases Add more RSpec aliases Dec 17, 2015
@Bartuz
Copy link
Contributor Author

Bartuz commented Dec 17, 2015

@twalpole I have merged these tasks and refactored focus tag specs

alias :given :let
alias :given! :let!
alias :feature :describe
alias :xfeature :xdescribe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The base version of RSpec we currently claim support for (2.2) doesn't support xdescribe -- don't add any of these changes for RSpec 2 - capybara will no longer support it in the next major release anyway

@Bartuz
Copy link
Contributor Author

Bartuz commented Dec 18, 2015

rbx-2 uses rspec-core 3.4.1 and fails after removing rspec 2 aliases. need to investigate

@in_filtered_hook = true
end

if RSpec::Core::Version::STRING.to_f >= 3.0 || RUBY_ENGINE == 'rbx'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@twalpole I don't know if it's good idea to put if statement for rbx. I'm unfamiliar with it at all. Do you think it's acceptable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea why 'rbx' would cause a failure here, and really don't want to skip testing on it without understanding exactly why it's failing

@twalpole
Copy link
Member

Ok looks like the tests pass, please squash this down to one commit

@Bartuz
Copy link
Contributor Author

Bartuz commented Dec 20, 2015

Should I force push to bartuz/master or create new PR?

@twalpole
Copy link
Member

Just squash and force push, and in the future please create a feature branch in your repo for changes, rather than doing it in master

New tags are ffeature (tag focus: true) / xfeature (pending)
@Bartuz
Copy link
Contributor Author

Bartuz commented Dec 20, 2015

@twalpole thanks you assistance and patience! :)

twalpole added a commit that referenced this pull request Dec 21, 2015
Add ffeature and xfeature RSpec aliases
@twalpole twalpole merged commit 52dab1b into teamcapybara:master Dec 21, 2015
@twalpole
Copy link
Member

Thanks a lot!

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

Successfully merging this pull request may close these issues.

2 participants