Skip to content

Instantly share code, notes, and snippets.

@LBRapid
Created October 21, 2011 17:03
Show Gist options
  • Save LBRapid/1304330 to your computer and use it in GitHub Desktop.
Save LBRapid/1304330 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(:country)
@collection = Country.order(:name)
Factory(:state)
Factory(:state, :name => "Maryland", :abbr => "MD")
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