Re: [rspec-users] Spec-ing private method

2013-05-16 Thread Matt Wynne
behaved as expected? Is there a collaborator on this class that it will send a message to? Is there some state that it will set on this class that I can read? cheers, Matt -- http://mattwynne.net || https://twitter.com/mattwynne || http://the-cucumber-book.com || http://bddkickstart.com || http

Re: [rspec-users] expecting one of two conditions

2013-03-10 Thread Matt Wynne
class, then assert on that? cheers, Matt -- http://mattwynne.net || https://twitter.com/mattwynne || http://the-cucumber-book.com || http://bddkickstart.com || http://www.relishapp.com ___ rspec-users mailing list rspec-users@rubyforge.org http

Re: [rspec-users] hiiiiiii...........lots of question ..

2012-08-07 Thread Matt Wynne
://pragprog.com/book/achbd/the-rspec-book cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Teacher, http://bddkickstart.com Founder, http://www.relishapp.com/ Twitter, https://twitter.com/mattwynne ___ rspec

Re: [rspec-users] describe, context, feature, scenario

2012-07-16 Thread Matt Wynne
describing in this spec), then use #context inside that to explain the different hoops I'm making that thing jump through in my examples. cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http://www.relishapp.com/ Twitter, https

Re: [rspec-users] Selenium+Autotest: how to run browser in background?

2012-07-05 Thread Matt Wynne
and you never see it. cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http://www.relishapp.com/ Twitter, https://twitter.com/mattwynne ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] Newbie testing questions

2012-06-01 Thread Matt Wynne
/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http://www.relishapp.com/ Twitter, https://twitter.com/mattwynne

Re: [rspec-users] rspec-2.10 is released!

2012-05-05 Thread Matt Wynne
(Jonathan del Strother) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users Maybe you need some tests for this email template ;) cheers, Matt -- Freelance programmer coach Author, http

Re: [rspec-users] Smart mocks for ActiveRecord to speed up tests

2012-04-16 Thread Matt Wynne
around the ActiveRecord model that makes sense in your domain, and can therefore be easily mocked. cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http://www.relishapp.com/ Twitter, https://twitter.com/mattwynne

Re: [rspec-users] Argument Non-Matchers

2012-04-11 Thread Matt Hauck
Hmm, that's not exactly what I was thinking of... I don't mean that there should be no arguments at all, but that the arguments should _not_ be of a certain match. On Tuesday, April 10, 2012 8:48:37 PM UTC-7, Justin Ko wrote: On Apr 9, 2012, at 2:41 PM, Matt Hauck wrote: Is there a way

Re: [rspec-users] Can't access https://www.relishapp.com/rspec from Chrome

2012-04-07 Thread Matt Wynne
, please email supp...@relishapp.com and we can sort it out offline. cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http://www.relishapp.com/ Twitter, https://twitter.com/mattwynne ___ rspec

Re: [rspec-users] mocking a reference to a polymorphic model?

2012-03-22 Thread Matt Wynne
references to the polymorphic models, but I don't see how to do that. Can you enumerate those reasons? This doesn't seem like a good use-case for mock_model, to me. cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Matt Wynne
On 7 Mar 2012, at 11:39, Morten Møller Riis wrote: On Mar 7, 2012, at 8:22 AM, Matt Wynne wrote: Hi all, I'm spec'ing a method that yields a value. Right now, I spec it like this: result = nil thing.do_stuff { |value| result = value } result.should == expected

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Matt Wynne
On 7 Mar 2012, at 15:12, Ken Chien wrote: Hi Matt, On Wed, Mar 7, 2012 at 2:22 AM, Matt Wynne m...@mattwynne.net wrote: Hi all, I'm spec'ing a method that yields a value. Right now, I spec it like this: result = nil thing.do_stuff { |value| result = value } result.should

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Matt Wynne
On 7 Mar 2012, at 18:16, David Chelimsky wrote: On Wed, Mar 7, 2012 at 11:56 AM, Matt Wynne m...@mattwynne.net wrote: On 7 Mar 2012, at 11:39, Morten Møller Riis wrote: On Mar 7, 2012, at 8:22 AM, Matt Wynne wrote: Hi all, I'm spec'ing a method that yields a value. Right now, I

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Matt Wynne
On 7 Mar 2012, at 18:26, Zach Dennis wrote: Matt, I have typically done what you are already doing, but I am also interested in the answer you seek. Another idea might be something like since #do-stuff would need to be invoked with a block: expect(thing, :do_stuff).to_yield val Yeah

Re: [rspec-users] should_receive_chain

2012-02-22 Thread Matt Wynne
off without it. ^ Yep, what he said ^ cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http://www.relishapp.com/ Twitter, https://twitter.com/mattwynne ___ rspec-users mailing list rspec

Re: [rspec-users] stale records with integration testing?

2012-02-17 Thread Matt Wynne
On 16 Feb 2012, at 12:21, David Chelimsky wrote: On Thu, Feb 16, 2012 at 4:17 AM, Matt Wynne m...@mattwynne.net wrote: On 14 Feb 2012, at 20:44, Justin Ko wrote: On Feb 14, 2012, at 9:23 AM, David Chelimsky wrote: On Tue, Feb 14, 2012 at 9:28 AM, Justin Ko jko...@gmail.com wrote

Re: [rspec-users] stale records with integration testing?

2012-02-16 Thread Matt Wynne
into a single shared library. FYI the feature for it is here: https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http

Re: [rspec-users] testing framework for test automation

2012-02-06 Thread Matt Wynne
the material in there would help you, particularly the chapters on using Capybara (which wraps Selenium Webdriver). [1] http://pragprog.com/book/hwcuc/the-cucumber-book cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http

Re: [rspec-users] Game development: how to test interactions like an attack?

2012-02-02 Thread Matt Wynne
specs be with that? I really can't start… :( Have you started to design a domain model for this? Could we see a picture? cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book Founder, http://www.relishapp.com/ Twitter, https://twitter.com/mattwynne

Re: [rspec-users] Spec'ing a block

2011-12-05 Thread Matt Wynne
to work. cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne ___ rspec-users mailing list rspec-users

Re: [rspec-users] Write tests for objects with lots of dependencies

2011-11-15 Thread Matt Wynne
@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne

Re: [rspec-users] Setting expections on chained calls

2011-11-07 Thread Matt Wynne
hear the tests screaming? :) cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne ___ rspec-users

Re: [rspec-users] problems matching generated html output...

2011-11-04 Thread Matt Wynne
their application in the Ruby / Rails world recently[3] [1] http://martinfowler.com/eaaDev/PassiveScreen.html [2] http://www.objectmentor.com/resources/articles/TheHumbleDialogBox.pdf [3] http://blog.steveklabnik.com/2011/09/06/the-secret-to-rails-oo-design.html cheers, Matt -- Freelance programmer coach

Re: [rspec-users] rspec 1.3.2, Rails 2.3.14 - plugins not loading

2011-10-21 Thread Matt Wynne
won't work with Rails apps that old, so you'll need to use Webrat for integration testing instead. cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com

Re: [rspec-users] URL helpers in model specs

2011-10-11 Thread Matt Wynne
the model and the example group. Obviously, that's not ideal, because it's only necessary for the specs to work. Is there any other solution? https://gist.github.com/1275799 I don't know about anyone else, but I can't see that gist. cheers, Matt -- Freelance programmer coach Author, http

Re: [rspec-users] Assertions for asynchronous behaviour

2011-10-02 Thread Matt Wynne
haven't used it, but this looks good to me. -- Alex Chaffee - a...@stinky.com http://alexchaffee.com http://twitter.com/alexch ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt

Re: [rspec-users] Assertions for asynchronous behaviour

2011-09-21 Thread Matt Wynne
/wait_for.rb [2] https://gist.github.com/1228927 cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne ___ rspec

Re: [rspec-users] Assertions for asynchronous behaviour

2011-09-20 Thread Matt Wynne
, Sep 13, 2011 at 3:56 AM, Matt Wynne m...@mattwynne.net wrote: Hi all, In GOOS[1] they use an assertion called assertEventually which samples the system for a success state until a certain timeout has elapsed. This allows you to synchronise the tests with asynchronous code. Do we have

[rspec-users] Assertions for asynchronous behaviour

2011-09-13 Thread Matt Wynne
capybara has wait_until { } but that's fairly rudimentary - the failure message isn't very helpful. Is there anything else already out there? [1] http://www.growing-object-oriented-software.com/ cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book

Re: [rspec-users] rspec testing inheritance

2011-09-07 Thread Matt Wynne
On 7 Sep 2011, at 07:53, Sidu Ponnappa wrote: On 7 September 2011 11:09, Justin Ko jko...@gmail.com wrote: On Tue, Sep 6, 2011 at 9:40 PM, slavix mikerin.sl...@gmail.com wrote: Hello, Is there any way to test model inheritance in spec? something like.. it { ChildModel.should

Re: [rspec-users] Speccing a redirect in routes

2011-08-10 Thread Matt Wynne
On 9 Aug 2011, at 13:11, David Chelimsky wrote: On Aug 9, 2011, at 2:00 AM, Chris Mear wrote: On 9 Aug 2011, at 01:02, David Chelimsky wrote: On Aug 8, 2011, at 6:00 PM, Matt Wynne wrote: I expected to be able to do something like this in a routing spec: { :get = '/legacy/route

[rspec-users] Speccing a redirect in routes

2011-08-08 Thread Matt Wynne
for redirect routing configuration. Did I miss it? Do I need to spec this with a request spec instead? cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne

Re: [rspec-users] functional testing with(through?) chrome

2011-08-07 Thread Matt Wynne
::Selenium::Driver.new(app, :browser = :chrome) end [1] https://github.com/jnicklas/capybara cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne

Re: [rspec-users] How can I make before/after all a method?

2011-07-29 Thread Matt Wynne
that help? cheers, Matt -- Freelance programmer coach Author, http://pragprog.com/book/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne ___ rspec-users mailing list rspec-users

Re: [rspec-users] How to test block parameters which is sending to method with arguments??

2011-07-18 Thread Matt Wynne
, Matt -- Freelance programmer coach Author, http://pragprog.com/books/hwcuc/the-cucumber-book (with Aslak Hellesøy) Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne ___ rspec-users mailing list rspec-users@rubyforge.org http

[rspec-users] tags and spec_helper

2011-06-24 Thread Matt Wynne
this? cheers, Matt m...@mattwynne.net 07974 430184 [1] https://www.destroyallsoftware.com/screencasts/catalog/fast-tests-with-and-without-rails ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Name of current example's file:line in a before block?

2011-06-15 Thread Matt Wynne
something similar in an RSpec before block, or do I need to delve into writing a formatter? cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] rake 0.9.0 activated error + debugger not working?

2011-06-07 Thread Matt Wynne
spec` the `spec` part is the folder where you want the `rspec` program to look for tests to run. Does that make more sense now? cheers, Matt -- Freelance programmer coach Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne

Re: [rspec-users] How do you test a module that extends ActiveSupport::Concern?

2011-05-31 Thread Matt Wynne
___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Cucumber and rspec, do cucumber step definitions use rspec?

2011-05-10 Thread Matt Wynne
use Ruby's own built-in assertions from the Test::Unit::Assertions namespace. cheers, Matt -- Freelance programmer coach Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne ___ rspec-users mailing list rspec-users

Re: [rspec-users] fields_for view spec

2011-05-03 Thread Matt S.
Chris Mear wrote in post #996234: On 2 May 2011 00:58, Matt S. li...@ruby-forum.com wrote: accepts_nested_attributes_for.) before(:each) do end %= f.fields_for :owner do |owner_fields| % class AssetController ApplicationController def new @asset = Asset.new @asset.build_owner end

Re: [rspec-users] fields_for view spec

2011-05-03 Thread Matt S.
Chris Mear wrote in post #996461: On 3 May 2011, at 15:05, Matt S. wrote: @asset.build_owner Here is the rendered content: input id=asset_name name=asset[name] size=30 type=text /form a lot about other things! If you want to see everything you can do a 'git clone git://github.com

Re: [rspec-users] fields_for view spec

2011-05-01 Thread Matt S.
of this on the web and have tried about everything I can think of, but I still can't get view specs containing nested model forms to pass, using fields_for on models with accepts_nested_attributes_for.) Much thanks!!! Matt Smith #spec/views/assets/new.html.erb_spec.rb describe assets/new.html.erb

Re: [rspec-users] before(:each) - need some clarification

2011-04-27 Thread Matt Wynne
) { string here } it should puts string do puts text end end Make sense? cheers, Matt -- Freelance programmer coach Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne ___ rspec-users mailing list rspec

Re: [rspec-users] Faking Files, Data, Git interractions with mocks/stubs/fixtures

2011-04-21 Thread Matt Wynne
://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users

Re: [rspec-users] Need suggestions on how to test a class

2011-04-13 Thread Matt Wynne
://www.nofeed.org ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt -- Freelance programmer coach Founder, http://relishapp.com +44(0)7974430184 | http://twitter.com/mattwynne

[rspec-users] fields_for view spec

2011-04-03 Thread Matt S.
For some reason I can't figure out how to make the fields_for tags render in the trivial example below; however, it works in the browser. What does #build_association do that my stubbed method does not replicate? (Or is that even the issue?) I appreciate the insight. Thanks! Matt Smith #spec

Re: [rspec-users] Can't put shared example group in its own file

2011-04-02 Thread Matt Wynne
/runner.rb:10:in `autorun' from /Library/Ruby/Gems/1.8/bin/rspec:19 rake aborted! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184

Re: [rspec-users] given-when-then-and syntax support in Rspec

2011-03-27 Thread Matt Wynne
http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Stub a controllers helper_method in a view template helper spec

2011-03-21 Thread Matt Wynne
), but it seems that this is not valid anymore for Rails 3 as there is no @controller.template. How do I stub that method? Kai ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m

Re: [rspec-users] Controller Spec DataMapper Chaining

2011-03-19 Thread Matt Wynne
@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] 'spec' command not working

2011-03-18 Thread Matt Wynne
? Not sure what to put in my PATH environment variables. Thanks! I mean Rspec, not Jspec It does help if you use the right words for things ;) Since RSpec 2.0, the binary command is now `rspec` rather than `spec`. cheers, Matt m...@mattwynne.net 07974 430184

Re: [rspec-users] Faking FS in specs

2011-03-13 Thread Matt Wynne
___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How to intercept an instance method from StdLib (1.9.2)

2011-03-06 Thread Matt Wynne
On 6 Mar 2011, at 10:30, Hedge Hog wrote: On Sun, Mar 6, 2011 at 12:27 AM, Matt Wynne m...@mattwynne.net wrote: On 5 Mar 2011, at 12:06, Hedge Hog wrote: On Fri, Mar 4, 2011 at 8:12 PM, Matt Wynne m...@mattwynne.net wrote: On 4 Mar 2011, at 05:45, Hedge Hog wrote: Hi, I'm

Re: [rspec-users] How to intercept an instance method from StdLib (1.9.2)

2011-03-05 Thread Matt Wynne
On 5 Mar 2011, at 12:06, Hedge Hog wrote: On Fri, Mar 4, 2011 at 8:12 PM, Matt Wynne m...@mattwynne.net wrote: On 4 Mar 2011, at 05:45, Hedge Hog wrote: Hi, I'm struggling with something that seems to be simple, and I've not had any joy following the RSpec books suggestions (p. 187

Re: [rspec-users] How to intercept an instance method from StdLib (1.9.2)

2011-03-04 Thread Matt Wynne
/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Cucumber not inserting record in db

2011-03-03 Thread Matt Wynne
. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users

Re: [rspec-users] RSpec doesn't see the DATA constant

2011-02-28 Thread Matt Wynne
://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Problem with rendering JSON

2011-02-13 Thread Matt Wynne
On 12 Feb 2011, at 12:49, Ants Pants wrote: On 11 February 2011 23:45, Matt Wynne m...@mattwynne.net wrote: On 11 Feb 2011, at 16:04, Ants Pants wrote: You are my last resort for solving this issue as I have tried and tried to solve it myself but can't. I'm not even sure if it's

Re: [rspec-users] Problem with rendering JSON

2011-02-11 Thread Matt Wynne
http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] custom matchers for request specs

2011-02-08 Thread Matt Wynne
routing methods module (can't remember the name off-hand) you won't have access to either of these methods in the matcher. Look at the non-DSL way to create a matcher and this will make more sense. Also, you need to return true / false from #match, rather than using an assertion. cheers, Matt m

Re: [rspec-users] Comparing two XML documents

2011-01-31 Thread Matt Wynne
On 31 Jan 2011, at 08:26, Pat Maddox wrote: I load my XML docs into a hash using Hash#from_xml and then compare the hashes. Bullseye! Thanks Pat. On Jan 26, 2011, at 7:26 AM, Matt Wynne m...@mattwynne.net wrote: I have a problem. I have a test that needs to assert that one XML document

[rspec-users] Comparing two XML documents

2011-01-26 Thread Matt Wynne
that already exists. I feel like I'm missing a way to do it within an XML library, for example. Any clues out there? cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman

Re: [rspec-users] 'require'ing files from other directories

2011-01-21 Thread Matt Wynne
On 21 Jan 2011, at 16:22, Brian Warner wrote: Matt Wynne wrote in post #976412: On 20 Jan 2011, at 19:32, Brian Warner wrote: I have a file in step_definitions that's giving me an error for an uninitialized constant. My guess is I need to 'require' the file where that class is defined

Re: [rspec-users] 'require'ing files from other directories

2011-01-20 Thread Matt Wynne
your require statement is in features/support/env.rb I'm surprised that the book doesn't tell you to do that - did you maybe miss a step? cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http

[rspec-users] Fantastic Thread on Mock Objects

2011-01-02 Thread Matt Wynne
This is a classic, with some terrific insights from Steve Freeman and Nat Pryce, two of the finest practitioners of TDD that I know: http://groups.google.com/group/growing-object-oriented-software/t/af0c4251123fde43 cheers, Matt m...@mattwynne.net 07974 430184

Re: [rspec-users] Specing Ajaxy Views

2011-01-02 Thread Matt Wynne
___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http

Re: [rspec-users] BDD and Performance

2010-12-29 Thread Matt Wynne
worth tagging them to exclude them from your check-in build run and running them in a nightly build instead. Hope that helps. cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org

Re: [rspec-users] Webrat or RSpec and Table Headers

2010-12-29 Thread Matt Wynne
can even diff it against a Cucumber::Ast::Table object. cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Webrat or RSpec and Table Headers

2010-12-29 Thread Matt Wynne
On 29 Dec 2010, at 10:21, Matt Wynne wrote: On 29 Dec 2010, at 06:14, Shea Levy wrote: Hi all, Suppose I have a table that lists all of my products, that includes a a thDescription/th somewhere in the first tr, and each product has its data held within a tr id=product%= product.id

Re: [rspec-users] Failing View Spec, rspec-rails 2.2.1

2010-12-17 Thread Matt S.
Hey David, You rock. Thanks a million. Got it working right away! Thanks, Matt -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Comparing files

2010-12-11 Thread Matt Wynne
On 10 Dec 2010, at 16:21, Ben Mabey wrote: On 12/10/10 8:56 AM, Matt Wynne wrote: Hello folks, I'm writing some tests for file upload code. The files are binary, images mostly. I'm futzing around a bit, trying to figure out how to assert that the uploaded file is the same as some golden

Re: [rspec-users] unit vs. functional specs

2010-12-11 Thread Matt Wynne
%. These days, unless I'm rescuing a legacy project, I only really use code coverage to tell me about unused code that I can delete. cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman

Re: [rspec-users] RSpec2: How to avoid an example run when previous failed

2010-12-11 Thread Matt Wynne
. Thank you for your help, Gennady. I don't consider that noise, I consider it useful clues as to what's wrong. cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo

[rspec-users] Comparing files

2010-12-10 Thread Matt Wynne
(path_to_expected_file) Then when it fails, I get an ugly diff of the difference between the binary files. So I'm about to invent something of my own. Has anyone got a good pattern for doing this already? cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users

Re: [rspec-users] Comparing files

2010-12-10 Thread Matt Wynne
On 10 Dec 2010, at 15:56, Matt Wynne wrote: Hello folks, I'm writing some tests for file upload code. The files are binary, images mostly. I'm futzing around a bit, trying to figure out how to assert that the uploaded file is the same as some golden master. If I do this: File.read

Re: [rspec-users] How can I use nested before functions?

2010-12-03 Thread Matt Wynne
! Best regards, Erik ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt m...@mattwynne.net 07974 430184 ___ rspec-users mailing list rspec

[rspec-users] Failing View Spec, rspec-rails 2.2.1

2010-12-01 Thread Matt Smith
;input id=message_submit name=commit type=submit value=Save Note the value=Message_#lt;RSpec::Core::ExampleGroup::Nested_1:0x010312db68gt;, which must be why the test fails. Is this an intentional change on how stub or assign works? Much thanks! Matt Smith -- matthewcalebsm...@gmail.com

[rspec-users] view.should render_template best practices?

2010-11-16 Thread Matt Darby
I've been looking for the definitive answer for months now, and the RSpec book doesn't touch on it at all: How do we now handle stubbing out rendering of partials in view specs in RSpec2? I have a large (35K+ lines of views and related specs) that I'm trying to upgrade to Rails3/RSpec2. My views

[rspec-users] no such file to load -- spec/rake/spectask

2010-10-13 Thread Matt Davies
Hello there I'm running a rails 2.3.5 project and I can't run any rake tasks My error is no such file to load -- spec/rake/spectask Here's a relevant snippet of gem list output rails (2.3.5) rake (0.8.7) random_data (1.5.0) RedCloth (4.2.2) remarkable (3.1.13) remarkable_activerecord

Re: [rspec-users] no such file to load -- spec/rake/spectask

2010-10-13 Thread Matt Davies
I've found a solution. I upgraded rspec-rails to 1.3.3 in my gemfile, which in turn downgraded rspec from 2.0 to 1.3.1 in the gem list. This configuration now works ok. God knows what was happening there. -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] no such file to load -- spec/rake/spectask

2010-10-13 Thread Matt Davies
Matt -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] render_template giving an odd error?

2010-10-11 Thread Matt Darby
Hey all, I'm trying to migrate over to Rails3/RSpec2 and I cannot seem to get the specing of `render` right. I know there was some changes in RSpec2 that affect this, and I was hoping to get a bit of help. I have this is in a before block in a view spec: view.should

Re: [rspec-users] Factories vs. stubs/mocks

2010-08-31 Thread Matt Wynne
have a dependency on ActiveRecord leaking out of my model all over the place. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt http://blog.mattwynne.net +44(0)7974 430184

Re: [rspec-users] Default format for all requests in a spec

2010-08-30 Thread Matt Wynne
cheers, Matt http://blog.mattwynne.net +44(0)7974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] there should be one test or two?

2010-08-27 Thread Matt Wynne
user.deposit_record.should == #something. end -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt http://blog.mattwynne.net +44(0)7974 430184

Re: [rspec-users] Controller spec with devise.

2010-08-26 Thread Matt Wynne
David Chelimsky dchelim...@gmail.com wrote: On Aug 24, 2010, at 6:51 PM, Titinux wrote: Hello, I'm new in using RSpec and I can't figured out to spec this controller action. class OrdersController ApplicationController before_filter :authenticate_user! def index

Re: [rspec-users] Including modules for view test in RSpec 2.0.0.beta.19

2010-08-16 Thread Matt Wynne
, Matt http://blog.mattwynne.net +44(0)7974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Name collision - how would you handle this?

2010-08-09 Thread Matt Wynne
On 9 Aug 2010, at 01:54, David Chelimsky wrote: On Aug 8, 2010, at 11:13 AM, Matt Wynne wrote: On 8 Aug 2010, at 16:53, David Chelimsky wrote: On Aug 8, 2010, at 10:40 AM, Matt Wynne wrote: On 8 Aug 2010, at 16:38, David Chelimsky wrote: On Aug 7, 2010, at 4:10 PM, David Chelimsky

Re: [rspec-users] Name collision - how would you handle this?

2010-08-09 Thread Matt Wynne
On 9 Aug 2010, at 13:04, David Chelimsky wrote: On Aug 9, 2010, at 6:37 AM, Matt Wynne wrote: On 9 Aug 2010, at 01:54, David Chelimsky wrote: On Aug 8, 2010, at 11:13 AM, Matt Wynne wrote: On 8 Aug 2010, at 16:53, David Chelimsky wrote: On Aug 8, 2010, at 10:40 AM, Matt

Re: [rspec-users] Name collision - how would you handle this?

2010-08-08 Thread Matt Wynne
cheers, Matt http://blog.mattwynne.net +44(0)7974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Name collision - how would you handle this?

2010-08-08 Thread Matt Wynne
it with the Assertions module's methods?) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt http://blog.mattwynne.net +44(0)7974 430184 ___ rspec

Re: [rspec-users] Name collision - how would you handle this?

2010-08-08 Thread Matt Wynne
On 8 Aug 2010, at 16:53, David Chelimsky wrote: On Aug 8, 2010, at 10:40 AM, Matt Wynne wrote: On 8 Aug 2010, at 16:38, David Chelimsky wrote: On Aug 7, 2010, at 4:10 PM, David Chelimsky wrote: Hey all, It turns out that if you have * Rails (2 or 3) * Ruby-1.9 * a model named

Re: [rspec-users] [newbie] tradeoffs of direct model access vs. simulated browser (webrat)

2010-08-04 Thread Matt Wynne
these with some other scenarios that focus on the behaviour of the user interface if you feel you need that assurance. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt http

Re: [rspec-users] newbie: how to preserve NoMethodError under stubbing?

2010-07-24 Thread Matt Wynne
Lille, On Sat, 24 Jul 2010 01:26 -0500, David Chelimsky dchelim...@gmail.com wrote: On Fri, Jul 23, 2010 at 6:46 PM, Lille lille.pengu...@gmail.com wrote: Hi, I've been browsing the RSpec book and the RDoc, but I can't see how to ensure the following: Stub an instance with a method

Re: [rspec-users] Data-wise context combination for controller speccing

2010-07-19 Thread Matt Wynne
://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt http://blog.mattwynne.net +44(0)7974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Data-wise context combination for controller speccing

2010-07-19 Thread Matt Wynne
On 19 Jul 2010, at 11:38, Wincent Colaiuta wrote: El 19/07/2010, a las 10:58, Matt Wynne escribió: On 18 Jul 2010, at 00:10, David Chelimsky wrote: On Jul 17, 2010, at 1:18 PM, Costa Shapiro wrote: Hello, I've been thinking of how to express my idea in code, but since I've never

Re: [rspec-users] How do I setup Rspec, Cucumber to test a Gem?

2010-07-19 Thread Matt Wynne
___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users cheers, Matt http://blog.mattwynne.net +44(0)7974 430184 ___ rspec-users mailing list rspec-users@rubyforge.org

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

2010-07-16 Thread Matt Wynne
On 15 Jul 2010, at 14:55, Chuck Remes wrote: On Jul 14, 2010, at 4:20 PM, Matt Wynne wrote: You can do this, by using a test spy to remember the value of foo passed into the stubbed constructor and then later comparing it: let(:foo) { Foo.new } it should allocate a helper class

  1   2   3   4   5   6   7   >