Skip to content

Instantly share code, notes, and snippets.

@seejee
Created June 12, 2014 12:36
Show Gist options
  • Save seejee/345cc2a1194cf6e62f24 to your computer and use it in GitHub Desktop.
Save seejee/345cc2a1194cf6e62f24 to your computer and use it in GitHub Desktop.
describe "after first incorrect attempt" do
before do
drag_item_to_category "apple", "a-f"
drag_item_to_category "orange", "g-n"
drag_item_to_category "watermelon", "o-w"
drag_item_to_category "yak", "o-w"
check_button.click
end
it "marks items with their correctness" do
expect(item('apple')).to be_marked_correct
expect(item('orange')).to be_marked_correct
expect(item('watermelon')).to be_marked_incorrect
expect(item('yak')).to be_marked_incorrect
end
it "disables dragging of correct items" do
drag_item_to_category "apple", "g-n"
expect('apple').to be_in_category('a-f')
end
it "disallows moving on" do
expect(next_button).to be_disabled
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment