Created
October 11, 2013 14:38
-
-
Save jonallured/6935777 to your computer and use it in GitHub Desktop.
Calc converter
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
class Converter | |
def initialize(input) | |
@input = input | |
end | |
def convert | |
"3 + 2" | |
end | |
end | |
describe Converter do | |
it "moves arguments around" do | |
converter = Converter.new("(+ 3 2") | |
converter.convert.should eq "3 + 2" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is obviously dumb because line 7 is just spitting back what line 14 is expecting, but your question was about structuring the spec file, so that's what I focused on. The next step here would be to add an assertion for your next test case and then actually begin the implementation.
Hope this helps!! :)