Permalink
Browse files

extended example_bacon.rb example

  • Loading branch information...
1 parent 7751f29 commit b323903224df2b94d767df14f3a33f40efede85a @banister committed Feb 10, 2012
Showing with 36 additions and 0 deletions.
  1. +8 −0 examples/example_bacon.rb
  2. +28 −0 lib/plymouth/commands.rb
@@ -12,4 +12,12 @@
it 'should be empty' do
@array.empty?.should == true
end
+
+ it 'should have 3 items' do
+ [1, 2, 3].size.should == 3
+ end
+
+ it 'should contain only numbers' do
+ [1, "2", 3].all? { |v| v.is_a?(Fixnum).should == true }
+ end
end
View
@@ -0,0 +1,28 @@
+module Plymouth
+ Commands = Pry::CommandSet.new do
+ create_command "plymouth-off", "Disable Plymouth." do
+ banner <<-BANNER
+ Usage: plymouth-off
+ Exit the REPL and turn Plymouth off for the duration of the test suite.
+ BANNER
+
+ def process
+ Plymouth.disable!
+
+ # exit the REPL
+ run "exit-all"
+ end
+ end
+
+ create_command "plymouth-on", "Enable Plymouth." do
+ banner <<-BANNER
+ Usage: plymouth-off
+ Enable Plymouth.
+ BANNER
+
+ def process
+ Plymouth.enable!
+ end
+ end
+ end
+end

0 comments on commit b323903

Please sign in to comment.