Re: [rspec-users] pending blocks

2010-07-14 Thread David Chelimsky
On Jul 14, 2010, at 7:44 PM, rogerdpack wrote: > Would it be possible to have pending be accessible everywhere? > > Curgem rently with > > describe '' do > pending 'abc' do > end > end In rspec-2, you can do this: describe "something", :pending => true do ... end And all the examples in tha

[rspec-users] pending blocks

2010-07-14 Thread rogerdpack
Would it be possible to have pending be accessible everywhere? Curgem rently with describe '' do pending 'abc' do end end yields: C:\dev\ruby\universal-scene-skipper\spec>spec small.spec C:/dev/ruby/universal-scene-skipper/spec/small.spec:3: undefined method `pending' for Spec::Example::Examp

Re: [rspec-users] set expectation using self in constructor?

2010-07-14 Thread Matt Wynne
On 14 Jul 2010, at 15:26, Chuck Remes wrote: > I find myself using this pattern quite a bit. > > rspec 1.30 > ruby 1.9.1, 1.9.2-rc2, jruby 1.51 all on osx 10.6.4 > > class Foo > def initialize >@bar = Bar.new > end > end > > context "init" do > it "should allocate a helper class Bar" do

[rspec-users] Windowed comparison for differences in the middle of long strings

2010-07-14 Thread Alex Chaffee
When two strings fail to match, if the difference is somewhere in the middle of the strings, it can be annoying/impossible to track down the actual difference. I've written a little Comparison object that provides this kind of error message: Strings differ at position 12: expected: ..."efghijklmno

Re: [rspec-users] set expectation using self in constructor?

2010-07-14 Thread Rick DeNatale
On Wed, Jul 14, 2010 at 10:26 AM, Chuck Remes wrote: > I find myself using this pattern quite a bit. > > rspec 1.30 > ruby 1.9.1, 1.9.2-rc2, jruby 1.51 all on osx 10.6.4 > > class Foo >  def initialize >   �...@bar = Bar.new >  end > end > > context "init" do >  it "should allocate a helper class

Re: [rspec-users] RSpec Email-Spec Problem

2010-07-14 Thread Rails Learner
I have figure this out. I wanted to share this in case someone is having the same problem. I have taken a different route to test email body: Here is how my example looks now: it "should contain child's first name and last name in email body" do for part in @email.parts if part["Conte

[rspec-users] set expectation using self in constructor?

2010-07-14 Thread Chuck Remes
I find myself using this pattern quite a bit. rspec 1.30 ruby 1.9.1, 1.9.2-rc2, jruby 1.51 all on osx 10.6.4 class Foo def initialize @bar = Bar.new end end context "init" do it "should allocate a helper class Bar" do Bar.should_receive(:new) Foo.new end end That all works w

Re: [rspec-users] Hiding test_unit Generators ?

2010-07-14 Thread David Chelimsky
On Jul 13, 2010, at 8:49 PM, Arco wrote: > In a recent blog post, David wrote: > > Because RSpec is the test framework of record, Rails doesn’t know to > hide the test_unit generators. If you want to hide them, just add this > to one of your config files: > >Rails::Generators.hide_namespace(

Re: [rspec-users] RSpec Email-Spec Problem

2010-07-14 Thread Rails Learner
Anyone, who can help? -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users