1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Merge pull request #1123 from thomas-holmes/update-rspec-configuration

Make Rspec 3 compliant
This commit is contained in:
Jonas Nicklas 2013-07-21 01:40:06 -07:00
commit c074fe1070
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ RSpec.configure do |config|
Capybara.use_default_driver
end
end
config.before do
config.before do |example|
if self.class.include?(Capybara::DSL)
Capybara.current_driver = Capybara.javascript_driver if example.metadata[:js]
Capybara.current_driver = example.metadata[:driver] if example.metadata[:driver]

View file

@ -15,7 +15,7 @@ feature "Capybara's feature DSL" do
page.should have_content('Hello world!')
end
scenario "preserves description" do
scenario "preserves description" do |example|
example.metadata[:full_description].should == "Capybara's feature DSL preserves description"
end
@ -41,11 +41,11 @@ feature "Capybara's feature DSL" do
page.should have_content 'Hello world!'
end
scenario 'are marked in the metadata as capybara_feature' do
scenario 'are marked in the metadata as capybara_feature' do |example|
example.metadata[:capybara_feature].should be_true
end
scenario 'have a type of :feature' do
scenario 'have a type of :feature' do |example|
example.metadata[:type].should eq :feature
end
end