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
// 1: Visit http://mario5.florian-rappl.de/#menu | |
// 2: Copy and paste the following code into the console | |
// 3: You may need to update the pad id's for your midi controller. Output will appear in the console when you press pads, take the 2nd value from each pad event and tweak the controller values at the bottom of this script, then paste it into the console again. | |
// request MIDI access | |
if (navigator.requestMIDIAccess) { | |
navigator.requestMIDIAccess({ | |
sysex: false // this defaults to 'false' and we won't be covering sysex in this article. | |
}).then(onMIDISuccess, onMIDIFailure); | |
} else { |
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
# Model | |
expect(@user).to have(1).error_on(:username) # checks whether there is an error in username | |
expect(@user.errors[:username]).to include("can't be blank") # check for the error message | |
# Rendering | |
expect(response).to render_template(:index) | |
# Redirecting |