Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @invalid-email-address Anonymous created this gist Mar 27, 2015.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    context "HAPPY PATHS" do
    #...
    scenario "create a parking lot and check hints count" do
    @tenant.default_location.parking_lots.first.destroy
    click_link "Create Parking Lot"
    fill_in "Name", with: "Parking Lot 4"
    select "Corporate", from: "Workgroup"
    click_button "Submit"
    success_messages ["Parking Lot successfully created."]
    has_no_error_message
    expect(page).to have_css("table#parking_lots tr", count: 3)
    expect(page).to have_css("table#parking_lots tr", text: "Parking Lot 4")
    expect(@tenant.default_location.parking_lots.find_by_name("Parking Lot 4").hints.count).to eq(4)
    end
    # ...
    end