Skip to content

Commit

Permalink
Enable Ruby warnings for tests and fix them
Browse files Browse the repository at this point in the history
  • Loading branch information
beerlington committed Feb 9, 2013
1 parent e6a9575 commit 0789ea2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
require "bundler/gem_tasks"
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:spec) do |t|
t.ruby_opts = "-w"
end

task :default => :spec
1 change: 1 addition & 0 deletions lib/classy_enum/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def build(value, options={})
# Subclass the base class and make it behave like the value that it is
object = Class.new(base_class) {
instance_variable_set(:@option, value)
instance_variable_set(:@index, 0)
delegate :blank?, :nil?, :to => :option
}.new
end
Expand Down
4 changes: 2 additions & 2 deletions spec/classy_enum_inheritance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class ProjectTier::Two < ProjectTier::One

describe 'Classy Enum inheritance' do
it 'should inherit from the previous class' do
ProjectTier::One.inherited_properties.should == [1,2,3]
ProjectTier::Two.inherited_properties.should == [1,2,3,4,5,6]
ProjectTier::One.inherited_properties.should eql([1,2,3])
ProjectTier::Two.inherited_properties.should eql([1,2,3,4,5,6])
end

it 'should instantiate the subclass' do
Expand Down

0 comments on commit 0789ea2

Please sign in to comment.