Created
March 15, 2016 23:14
-
-
Save ebbnormal/462757c2c085bf749d5c to your computer and use it in GitHub Desktop.
a small feature spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feature "Create Scores" do | |
let(:user) {FactoryGirl.create(:user, name: 'Garret Hickman')} | |
background{ login_as user} | |
scenario "takes you to the score show path" do | |
create_score("handwritten", "Feel tempo. Feel tempoless. Fly fly fly fly fly!") | |
expect(current_path).to eq(score_path) | |
end | |
def create_score(type, text) | |
if(type=="handwritten") | |
visit scores_path | |
click_button "Handwrite A Score" | |
fill_in 'Score', with: text | |
click_button 'Save' | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment