Don't set global before filters
This commit is contained in:
parent
38c1cbb71a
commit
65232a0dbc
|
@ -1,9 +1,7 @@
|
|||
shared_examples_for "has_field" do
|
||||
before do
|
||||
@session.visit('/form')
|
||||
end
|
||||
|
||||
describe '#has_field' do
|
||||
before { @session.visit('/form') }
|
||||
|
||||
it "should be true if the field is on the page" do
|
||||
@session.should have_field('Dog')
|
||||
@session.should have_field('form_description')
|
||||
|
@ -31,6 +29,8 @@ shared_examples_for "has_field" do
|
|||
end
|
||||
|
||||
describe '#has_no_field' do
|
||||
before { @session.visit('/form') }
|
||||
|
||||
it "should be false if the field is on the page" do
|
||||
@session.should_not have_no_field('Dog')
|
||||
@session.should_not have_no_field('form_description')
|
||||
|
@ -58,6 +58,8 @@ shared_examples_for "has_field" do
|
|||
end
|
||||
|
||||
describe '#has_checked_field?' do
|
||||
before { @session.visit('/form') }
|
||||
|
||||
it "should be true if a checked field is on the page" do
|
||||
@session.should have_checked_field('gender_female')
|
||||
@session.should have_checked_field('Hamster')
|
||||
|
@ -74,6 +76,8 @@ shared_examples_for "has_field" do
|
|||
end
|
||||
|
||||
describe '#has_unchecked_field?' do
|
||||
before { @session.visit('/form') }
|
||||
|
||||
it "should be false if a checked field is on the page" do
|
||||
@session.should_not have_unchecked_field('gender_female')
|
||||
@session.should_not have_unchecked_field('Hamster')
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
shared_examples_for "has_select" do
|
||||
before do
|
||||
@session.visit('/form')
|
||||
end
|
||||
|
||||
describe '#has_select?' do
|
||||
before { @session.visit('/form') }
|
||||
|
||||
it "should be true if the field is on the page" do
|
||||
@session.should have_select('Locale')
|
||||
@session.should have_select('form_region')
|
||||
|
@ -45,6 +43,8 @@ shared_examples_for "has_select" do
|
|||
end
|
||||
|
||||
describe '#has_no_select?' do
|
||||
before { @session.visit('/form') }
|
||||
|
||||
it "should be false if the field is on the page" do
|
||||
@session.should_not have_no_select('Locale')
|
||||
@session.should_not have_no_select('form_region')
|
||||
|
|
Loading…
Reference in New Issue