Skip to content

Instantly share code, notes, and snippets.

@he9lin
Created October 19, 2014 02:10
Show Gist options
  • Save he9lin/64fc1d51e3a466c90513 to your computer and use it in GitHub Desktop.
Save he9lin/64fc1d51e3a466c90513 to your computer and use it in GitHub Desktop.
Some useful turnip steps
step "I should be subscribed to captain mode queue events" do
subscription = \
page.driver.evaluate_script("PrivatePub.subscriptionObjects['/captain']")
expect(subscription).not_to be_nil
end
step "I should be in the room" do
expect(page).to have_selector("#room-#{@room.id}")
expect(URI.parse(page.current_url).fragment).to eq("/rooms/#{@room.id}")
subscription = \
page.driver.evaluate_script("PrivatePub.subscriptionObjects['/rooms/#{@room.id}']")
expect(subscription).not_to be_nil
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment