Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Expose RCCounter#decrement

  • Loading branch information...
commit 30d0ac55212dd7cad6376438ecf2f5d6e60dfd80 1 parent d2553a3
Jesse Cooke jc00ke authored
1  lib/ruby/1.8/maglev/rccounter.rb
View
@@ -20,4 +20,5 @@ class RCCounter
primitive 'value', 'value'
primitive 'increment', 'increment'
primitive 'increment_by', 'incrementBy:'
+ primitive 'decrement', 'decrement'
end
12 spec/maglev/reducedconflict/counter/decrement_spec.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.