Permalink
Browse files

Expose RCCounter#increment

  • Loading branch information...
1 parent 37a6cdc commit 54e7a13faf23dd821e5430d90416c61e0e8c3c84 @jc00ke jc00ke committed Oct 21, 2012
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_spec.rb
@@ -18,4 +18,5 @@ class RCCounter
class_primitive 'new', 'new'
primitive 'value', 'value'
+ primitive 'increment', 'increment'
end
@@ -0,0 +1,12 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+require 'maglev/rccounter'
+
+describe "RCCounter#increment" do
+
+ it "adds 1 to the counter" do
+ counter = RCCounter.new
+ counter.increment
+ counter.value.should == 1
+ end
+
+end

0 comments on commit 54e7a13

Please sign in to comment.