Permalink
Browse files

Expose RCCounter#increment_by

  • Loading branch information...
jc00ke committed Oct 21, 2012
1 parent 54e7a13 commit d2553a3b00e441d988aae5aea70855028102d4cd
Showing with 13 additions and 0 deletions.
  1. +1 −0 lib/ruby/1.8/maglev/rccounter.rb
  2. +12 −0 spec/maglev/reducedconflict/counter/increment_by_spec.rb
@@ -19,4 +19,5 @@ class RCCounter
primitive 'value', 'value'
primitive 'increment', 'increment'
+ primitive 'increment_by', 'incrementBy:'
end
@@ -0,0 +1,12 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+require 'maglev/rccounter'
+
+describe "RCCounter#increment_by" do
+
+ it "adds x to the counter" do
+ counter = RCCounter.new
+ counter.increment_by 10
+ counter.value.should == 10
+ end
+
+end

0 comments on commit d2553a3

Please sign in to comment.