Permalink
Browse files

Expose RCCounter#decrement

  • Loading branch information...
1 parent d2553a3 commit 30d0ac55212dd7cad6376438ecf2f5d6e60dfd80 @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/decrement_spec.rb
@@ -20,4 +20,5 @@ class RCCounter
primitive 'value', 'value'
primitive 'increment', 'increment'
primitive 'increment_by', 'incrementBy:'
+ primitive 'decrement', 'decrement'
end
@@ -0,0 +1,12 @@
+require File.expand_path('../../../../spec_helper', __FILE__)
+require 'maglev/rccounter'
+
+describe "RCCounter#decrement" do
+
+ it "subtracts 1 from the counter" do
+ counter = RCCounter.new
+ counter.decrement
+ counter.value.should == -1
+ end
+
+end

0 comments on commit 30d0ac5

Please sign in to comment.