Skip to content

Instantly share code, notes, and snippets.

@BDQ
Forked from LBRapid/states_spec.rb
Created October 21, 2011 17:07
Show Gist options
  • Save BDQ/1304341 to your computer and use it in GitHub Desktop.
Save BDQ/1304341 to your computer and use it in GitHub Desktop.
describe "States" do
before(:each) do
visit admin_path
click_link "Configuration"
end
context "admin visiting states listing" do
it "should correctly display the states" do
Factory(:state, :name => "Maryland", :abbr => "MD", :country => Factory(:country))
click_link "States"
save_and_open_page
find('table#listing_states tbody tr:nth-child(1) td:nth-child(1)').text.should == State.limit(1).order('name asc').to_a.first.anem
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment