Permalink
Browse files

[Tarish, Steven] Added text output and launch script

  • Loading branch information...
StevenNunez committed Apr 26, 2012
1 parent 3a733dd commit 90547da25e80f58685f35ec97471efd35aa4045f
Showing with 14 additions and 1 deletion.
  1. +0 −1 lib/class_project.rb
  2. +8 −0 lib/story_teller.rb
  3. 0 main.rb
  4. +6 −0 test/test_class_project.rb
View
@@ -1 +0,0 @@
-Dir["lib/*.rb"].each {|file| require file }
View
@@ -1,8 +1,16 @@
class StoryTeller
+ def initialize(story="")
+ @story = story
+ end
+
def input=(input)
@response = input
end
+
+ def narrate
+ @story
+ end
def response
@response
View
No changes.
@@ -6,4 +6,10 @@ def test_can_take_user_input
story_teller.input = "Hello World"
assert_equal "Hello World", story_teller.response
end
+
+ def test_can_output_story
+ story_teller = StoryTeller.new("Agile Intro")
+ story = story_teller.narrate
+ assert_equal "Agile Intro", story
+ end
end

0 comments on commit 90547da

Please sign in to comment.