Skip to content

Commit

Permalink
Character has a name, and can get/set it
Browse files Browse the repository at this point in the history
rake runs the test, and it passes. Added .swp files to gitignore. Rake
spits out a bunch of ugly garbage - wonder if I can fix that.
  • Loading branch information
Eric Coleman committed May 3, 2016
1 parent 436a3ef commit e338088
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
Binary file removed .Gemfile.swp
Binary file not shown.
Binary file removed .Rakefile.swp
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.swp
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new :spec

task :default => :spec

4 changes: 4 additions & 0 deletions lib/character.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class Character
attr_accessor :name
end

13 changes: 13 additions & 0 deletions spec/character_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require 'character'

describe Character do

it "can set its name" do
expected_name = "Nathan Explosion"
subject.name = expected_name
expect(subject.name).to eq(expected_name)
end

end


0 comments on commit e338088

Please sign in to comment.