Permalink
Browse files

fixed some of the rspec snippets

Signed-off-by: Martin Grenfell <martin_grenfell@msn.com>
  • Loading branch information...
1 parent 5888c08 commit a39cf9ee3564c933e0ee56c63fc7a46cd79f107b Reza Jelveh committed with scrooloose Feb 18, 2009
Showing with 96 additions and 96 deletions.
  1. +3 −3 ruby-rspec/aft.snippet
  2. +1 −1 ruby-rspec/anr.snippet
  3. +1 −1 ruby-rspec/anra.snippet
  4. +1 −1 ruby-rspec/anrb.snippet
  5. +1 −1 ruby-rspec/ant.snippet
  6. +1 −1 ruby-rspec/any.snippet
  7. +1 −1 ruby-rspec/atl.snippet
  8. +1 −1 ruby-rspec/atm.snippet
  9. +3 −3 ruby-rspec/bef.snippet
  10. +1 −1 ruby-rspec/conn.snippet
  11. +3 −3 ruby-rspec/des.snippet
  12. +3 −3 ruby-rspec/desc.snippet
  13. +1 −1 ruby-rspec/desrc.snippet
  14. +3 −3 ruby-rspec/dest.snippet
  15. +3 −3 ruby-rspec/dests.snippet
  16. +1 −1 ruby-rspec/ex.snippet
  17. +1 −1 ruby-rspec/mat.snippet
  18. +1 −1 ruby-rspec/mm.snippet
  19. +2 −2 ruby-rspec/moc.snippet
  20. +2 −2 ruby-rspec/mocw.snippet
  21. +2 −2 ruby-rspec/sh.snippet
  22. +2 −2 ruby-rspec/shb.snippet
  23. +2 −2 ruby-rspec/shbc.snippet
  24. +2 −2 ruby-rspec/shbio.snippet
  25. +2 −2 ruby-rspec/shbko.snippet
  26. +1 −1 ruby-rspec/shbr.snippet
  27. +1 −1 ruby-rspec/shbs.snippet
  28. +2 −2 ruby-rspec/she.snippet
  29. +2 −2 ruby-rspec/sheq.snippet
  30. +2 −2 ruby-rspec/shh.snippet
  31. +2 −2 ruby-rspec/shhal.snippet
  32. +2 −2 ruby-rspec/shham.snippet
  33. +2 −2 ruby-rspec/shhr.snippet
  34. +2 −2 ruby-rspec/shm.snippet
  35. +2 −2 ruby-rspec/shn.snippet
  36. +2 −2 ruby-rspec/shnb.snippet
  37. +2 −2 ruby-rspec/shnbc.snippet
  38. +2 −2 ruby-rspec/shnbio.snippet
  39. +2 −2 ruby-rspec/shnbko.snippet
  40. +1 −1 ruby-rspec/shnbr.snippet
  41. +1 −1 ruby-rspec/shnbs.snippet
  42. +2 −2 ruby-rspec/shnc.snippet
  43. +2 −2 ruby-rspec/shne.snippet
  44. +2 −2 ruby-rspec/shneq.snippet
  45. +2 −2 ruby-rspec/shnm.snippet
  46. +2 −2 ruby-rspec/shnr.snippet
  47. +2 −2 ruby-rspec/shnre.snippet
  48. +2 −2 ruby-rspec/shnredt.snippet
  49. +2 −2 ruby-rspec/shnrt.snippet
  50. +2 −2 ruby-rspec/shns.snippet
  51. +2 −2 ruby-rspec/shnt.snippet
  52. +2 −2 ruby-rspec/shr.snippet
  53. +2 −2 ruby-rspec/shre.snippet
@@ -1,3 +1,3 @@
-after(<+:each+>) do
- <++>
-end
+after(${1::each}) do
+ ${2}
+end
@@ -1 +1 @@
-and_return(<+value+>)
+and_return(${1:value})
@@ -1 +1 @@
-and_raise(<+exception+>)
+and_raise(${1:exception})
@@ -1 +1 @@
-and_return { <++> }
+and_return { ${1} }
@@ -1 +1 @@
-and_throw(<+sym+>)
+and_throw(${1:sym})
@@ -1 +1 @@
-and_yield(<+values+>)
+and_yield(${1:values})
@@ -1 +1 @@
-at_least(<+n+>).times
+at_least(${1:n}).times
@@ -1 +1 @@
-at_most(<+n+>).times
+at_most(${1:n}).times
@@ -1,3 +1,3 @@
-before(<+:each+>) do
- <++>
-end
+before(${1::each}) do
+ ${2}
+end
@@ -1 +1 @@
-controller_name :<+controller+>
+controller_name :${1:controller}
@@ -1,3 +1,3 @@
-describe "<+subject+>" do
- <++>
-end
+describe "${1:subject}" do
+ ${2}
+end
@@ -1,5 +1,5 @@
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
-describe <+controller+> do
- <++>
-end
+describe ${1:controller} do
+ ${2}
+end
@@ -1,3 +1,3 @@
describe <+controller+>, "<+GET|POST|PUT|DELETE+> <+/some/path+><+ <+with some parameters+>+>" do
<++>
-end
+end
@@ -1,3 +1,3 @@
-describe <+Type+> do
- <++>
-end
+describe ${1:Type} do
+ ${2}
+end
@@ -1,3 +1,3 @@
-describe <+Type+>, "<+description+>" do
- <++>
-end
+describe ${1:Type}, "${2:description}" do
+ ${3}
+end
@@ -1 +1 @@
-exactly(<+n+>).times
+exactly(${1:n}).times
@@ -21,4 +21,4 @@ end
def <+reverse_to+>(<+expected+>)
<++>.new(<+expected+>)
-end
+end
@@ -1 +1 @@
-mock_model(<+model+>)<++>
+mock_model(${1:model})${2}
@@ -1,2 +1,2 @@
-<+var+> = mock("<+mock_name+>"<+, :null_object => true+>)
-<++>
+${1:var} = mock("${2:mock_name}"${3:, :null_object => true})
+${4}
@@ -1,3 +1,3 @@
Spec::Runner.configure do |config|
- config.mock_with :<+mocha|flexmock|rr+>
-end
+ config.mock_with :${1:mocha|flexmock|rr}
+end
@@ -1,2 +1,2 @@
-<+target+>.should == <+value+>
-<++>
+${1:target}.should == ${2:value}
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should be(<+result+>)
-<++>
+${1:target}.should be(${2:result})
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should be_close(<+result+>, <+tolerance+>)
-<++>
+${1:target}.should be_close(${2:result}, ${3:tolerance})
+${4}
@@ -1,2 +1,2 @@
-<+target+>.should be_instance_of(<+klass+>)
-<++>
+${1:target}.should be_instance_of(${2:class})
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should be_a_kind_of(<+klass+>)
-<++>
+${1:target}.should be_a_kind_of(${2:class})
+${3}
@@ -1,2 +1,2 @@
response.should be_redirect
-<++>
+${1}
@@ -1,2 +1,2 @@
response.should be_success
-<++>
+${1}
@@ -1,2 +1,2 @@
-<+target+>.should eql(<+value+>)
-<++>
+${1:target}.should eql(${2:value})
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should equal(<+value+>)
-<++>
+${1:target}.should equal(${2:value})
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should have(<+num+>).<+things+>
-<++>
+${1:target}.should have(${2:num}).${3:things}
+${4}
@@ -1,2 +1,2 @@
-<+target+>.should have_at_least(<+num+>).<+things+>
-<++>
+${1:target}.should have_at_least(${2:num}).${3:things}
+${4}
@@ -1,2 +1,2 @@
-<+target+>.should have_at_most(<+num+>).<+things+>
-<++>
+${1:target}.should have_at_most(${2:num}).${3:things}
+${4}
@@ -1,2 +1,2 @@
-<+target+>.should have(<+n+>).records
-<++>
+${1:target}.should have(${2:n}).records
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should match(/<+regexp+>/)
-<++>
+${1:target}.should match(/${2:regexp}/)
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should_not == <+value+>
-<++>
+${1:target}.should_not == ${2:value}
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should_not be(<+result+>)
-<++>
+${1:target}.should_not be(${2:result})
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should_not be_close(<+result+>, <+tolerance+>)
-<++>
+${1:target}.should_not be_close(${2:result}, ${3:tolerance})
+${4}
@@ -1,2 +1,2 @@
-<+target+>.should_not be_instance_of(<+klass+>)
-<++>
+${1:target}.should_not be_instance_of(${2:klass})
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should_not be_a_kind_of(<+klass+>)
-<++>
+${1:target}.should_not be_a_kind_of(${2:klass})
+${3}
@@ -1,2 +1,2 @@
response.should_not be_redirect
-<++>
+${1}
@@ -1,2 +1,2 @@
response.should_not be_success
-<++>
+${1}
@@ -1,3 +1,3 @@
lambda do
- <++>
-end.should_not change(<+target+>, :<+method+>)
+ ${1}
+end.should_not change(${2:target}, :${3:method})
@@ -1,2 +1,2 @@
-<+target+>.should_not eql(<+value+>)
-<++>
+${1:target}.should_not eql(${2:value})
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should_not equal(<+value+>)
-<++>
+ ${1:target}.should_not equal(${2:value})
+ ${3}
@@ -1,2 +1,2 @@
-<+target+>.should_not match(/<+regexp+>/)
-<++>
+${1:target}.should_not match(/${2:regexp}/)
+${3}
@@ -1,2 +1,2 @@
-<+mock+>.should_not_receive(:<+message+>)<++>
-<++>
+${1:mock}.should_not_receive(:${2:message})${3}
+${4}
@@ -1,2 +1,2 @@
-<+target+>.should_not raise_error(<+error+>)
-<++>
+${1:target}.should_not raise_error(${2:error})
+${3}
@@ -1,2 +1,2 @@
-response.should_not redirect_to(<+url+>)
-<++>
+response.should_not redirect_to(${1:url})
+${2}
@@ -1,2 +1,2 @@
-<+target+>.should_not respond_to(:<+sym+>)
-<++>
+${1:target}.should_not respond_to(:${2:sym})
+${3}
@@ -1,2 +1,2 @@
-<+target+>.should_not satisfy { |<+obj+>| <++> }
-<++>
+${1:target}.should_not satisfy { |${2:obj}| <++> }
+${3}
@@ -1,2 +1,2 @@
-lambda { <++> }.should_not throw_symbol(:<+symbol+>)
-<++>
+lambda { ${1} }.should_not throw_symbol(:${2:symbol})
+${3}
@@ -1,2 +1,2 @@
-<+mock+>.should_receive(:<+message+>)<++>
-<++>
+${1:mock}.should_receive(:${2:message})${3}
+${4}
@@ -1,2 +1,2 @@
-<+target+>.should raise_error(<+error+>)
-<++>
+${1:target}.should raise_error(${2:error})
+${3}

0 comments on commit a39cf9e

Please sign in to comment.