Skip to content

Commit

Permalink
[Tarish, Steven] Added text output and launch script
Browse files Browse the repository at this point in the history
  • Loading branch information
octosteve committed Apr 26, 2012
1 parent 3a733dd commit 90547da
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/class_project.rb

This file was deleted.

8 changes: 8 additions & 0 deletions lib/story_teller.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Empty file removed main.rb
Empty file.
6 changes: 6 additions & 0 deletions test/test_class_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.