Re: [rspec-users] Is share_examples_for deprecated?

2010-03-06 Thread Nick Hoffman
Pat Maddox wrote: > describe "something something", :shared => true do > ... > end > > describe "chunky bacon" do > it_should_behave_like "something something" > end BTW, is rspec.info supposed to be up-to-date? It still recommends using "shared_examples_for". http://rspec.info/documentatio

Re: [rspec-users] Is share_examples_for deprecated?

2010-03-06 Thread Nick Hoffman
Pat Maddox wrote: > describe "something something", :shared => true do > ... > end > > describe "chunky bacon" do > it_should_behave_like "something something" > end Thanks, mate. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing li

Re: [rspec-users] Is share_examples_for deprecated?

2010-03-06 Thread Pat Maddox
describe "something something", :shared => true do ... end describe "chunky bacon" do it_should_behave_like "something something" end On Mar 6, 2010, at 2:31 PM, Nick Hoffman wrote: > API Dock says that "share_examples_for" is deprecated. If that's > correct, what should we be using instea

[rspec-users] Is share_examples_for deprecated?

2010-03-06 Thread Nick Hoffman
API Dock says that "share_examples_for" is deprecated. If that's correct, what should we be using instead? http://apidock.com/rspec/Spec/Extensions/Main/share_examples_for Thanks, Nick -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing l

[rspec-users] Newlines in step arguments Was How can I pass an XML block...

2010-03-06 Thread Ed Howland
On Tue, Apr 14, 2009 at 10:03 PM, Stephen Eley wrote: > On Tue, Apr 14, 2009 at 10:37 PM, Stephen Eley wrote: >> > All right, never mind.  Having been given enough clues that the > feature exists and what it generally might look like, I prowled > through Cucumber's specs and examples until I go

Re: [rspec-users] how to pass objects from spec to formatter from before :all block?

2010-03-06 Thread Jarmo Pertman
Since i'm using Watir then i usually open up the browser in before :all block like this: before :all do @browser = Watir::Browser.new end and then in the formatter I'm saving html of the browser - thus needing to access the browser object. I could solve it currently by using before :each block

Re: [rspec-users] how to pass objects from spec to formatter from before :all block?

2010-03-06 Thread David Chelimsky
On Sat, Mar 6, 2010 at 11:09 AM, Jarmo Pertman wrote: > Hello. > > I need to pass something from before :all to formatter. I know that i > could use options hash from spec and then get the value back in > formatter, but it doesn't work when i'm doing it from before :all. > > So, this work: > > # i

[rspec-users] how to pass objects from spec to formatter from before :all block?

2010-03-06 Thread Jarmo Pertman
Hello. I need to pass something from before :all to formatter. I know that i could use options hash from spec and then get the value back in formatter, but it doesn't work when i'm doing it from before :all. So, this work: # in spec before :each do options[:something] = 1 end # in formatter d

[rspec-users] RSpec 2 / Rails 3 autoload

2010-03-06 Thread Ashley Moran
Hi For the last 18 months I've been used to writing specs like this, which was written with Merb 1.1.0.pre and RSpec 1.3: module LanguageRepository describe DataMapperAdapter do it_should_behave_like "Contract: LanguageRepository" def language_repository DataMapper