[rspec-users] DatabaseCleaner and EmailSpec are looking for new maintainers

2013-09-11 Thread Ben Mabey
ement. For more details see this blog post: http://benmabey.com/2013/09/11/databasecleaner-and-email-spec-need-new-homes.html Thanks! -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] regular expression hang ruby.exe

2013-05-08 Thread Ben Lovell
32 in Task manager. Any ides how I can handle this? > > time_on_site.should match(/^00:[0-5][0-9]$/) > > > Best regards > Mattias > > Hey Mattias, Very peculiar. Could you produce the smallest possible script to reproduce this? Thanks, Ben ___

Re: [rspec-users] Irelan NEEDS Ruby on Rails Developers

2012-12-13 Thread Ben Lovell
eam... > > I would like to speak with you about an opportunity with an industry > leading Irish technology company.*Generous salary with excellent > benefits package and bonus included* > > > Please contact me for more information: > > kenneth.orei...@sabeo.com

Re: [rspec-users] unexpected should_receive behaviour

2012-10-09 Thread Ben Lovell
ontroller) > > just to check exactly what's happening > > thank you! > > You can set the number of times an expectation should be met or the order in which they're executed: https://www.relishapp.com/rspec/rspec-mocks/docs/message-expectations/receive-counts Regards,

Re: [rspec-users] unexpected should_receive behaviour

2012-10-09 Thread Ben Lovell
On 9 October 2012 13:56, enrico stano wrote: > Hi Ben, > > you could find more info browsing this Gist > https://gist.github.com/3848429#file_user_controller_spec.rb > > I've added it to my StackOverflow question too. > > Thank you for your time! > > ennr

Re: [rspec-users] unexpected should_receive behaviour

2012-10-09 Thread Ben Lovell
anyone give me a hint to understand that behaviour? > There is something wrong with your spec or your spec's setup. Could you post a gist of the spec and the controller action? Regards, Ben > > I've opened a question on StackOverflow too: > > http://stackoverflow.com/qu

Re: [rspec-users] i cannot seem to use at_least

2012-09-26 Thread Ben Lovell
se issues > https://github.com/rspec/rspec-mocks/issues/131 > https://github.com/rspec/rspec-mocks/issues/133 > > -- > best, > deepak > w: https://gist.github.com/deepak > Did you read the discussion from the issue? https://gith

[rspec-users] Newbie testing questions

2012-06-01 Thread Ben Densmore
I really want to understand what specifically I should be testing. Any guidance would be greatly appreicated. Thanks, Ben -- 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] Can't access https://www.relishapp.com/rspec from Chrome

2012-04-07 Thread Ben Lovell
On 7 April 2012 16:30, Rodrigo Rosenfeld Rosas wrote: > It seems it has an invalid certificate. > __**_ > Fine here. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinf

Re: [rspec-users] issues when trying to select an option in a drop down list

2012-02-29 Thread Ben Atkin
could install pry and add binding.pry above that line, and then run it, and then poke around in the repl and see if you've got the right context. You did make the request to get that page, right? Ben On Wed, Feb 29, 2012 at 10:04 PM, S Ahmed wrote: > My html looks like: > > Acura

Re: [rspec-users] tests using factorygirl

2012-02-29 Thread Ben Atkin
block just needs to return a single Location, and since it's run within a block it's delayed until the spec is run, rather than at load time.) Ben On Wed, Feb 29, 2012 at 10:19 PM, S Ahmed wrote: > I'm trying to use factory for a test case, but the model I am creating via > the

Re: [rspec-users] Why use DatabaseCleaner with rSpec?

2011-02-08 Thread Ben Mabey
c) clean multiple connections (with an ActiveRecord DB or otherwise) or d) are not testing a Rails app (where the transactional_fixtures come from) then using DatabaseCleaner will make your life easier. HTH, Ben ___ rspec-users mailing list r

Re: [rspec-users] Comparing files

2010-12-11 Thread Ben Mabey
On 12/11/10 2:03 AM, Matt Wynne wrote: 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 asser

Re: [rspec-users] Comparing files

2010-12-10 Thread Ben Mabey
(or other) hash. It won't tell you what is different.. just that they aren't identical which is what I think you want. So... something like: Digest::MD5.hexdigest(File.read(uploaded_file_path)).should == Digest::MD5.hexdigest(File.read(

Re: [rspec-users] Comparing files

2010-12-10 Thread Ben Lovell
Cyclic redundancy check (crc) Sent from my iPhone 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 sa

Re: [rspec-users] Testing initialize methods and chained methods

2010-10-20 Thread Oscar Del Ben
Thanks for all the replies and the help. On Tue, Oct 19, 2010 at 9:08 PM, David Chelimsky wrote: > On Oct 19, 2010, at 2:04 PM, Pat Maddox wrote: > > > On Oct 19, 2010, at 12:56 AM, Oscar Del Ben wrote: > > > >> I'm having some troubles understanding how to test a

[rspec-users] Testing initialize methods and chained methods

2010-10-19 Thread Oscar Del Ben
I'm having some troubles understanding how to test a couple of things. Usually, if I'm having trouble testing something, it means that my design could probably be improved or changed, but in these cases I think I'm doing the right thing. Here's the first scenario: class Foo def initialize d

Re: [rspec-users] Where do a set the description on a should satisfy.

2010-09-27 Thread Ben Mabey
the top of the spec like so: http://github.com/rspec/rspec-core/blob/master/spec/rspec/core_spec.rb#L1 By following this convention you will only have to specify the spec on the command line. HTH, Ben ___ rspec-users mailing list rspec-user

Re: [rspec-users] How do I test my Module?

2010-09-21 Thread Ben Mabey
ple: module MyModule def double num * 2 end end require 'ostruct' describe MyModule do def new_object(hash) OpenStruct.new(hash).extend(MyModule) end describe "#double" do it "doubles the num var" do new

Re: [rspec-users] Re-using Rspec Matchers

2010-09-08 Thread Ben Mabey
ot tried the above but I think it should work.) -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

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

2010-07-20 Thread Ben Mabey
Gem will work went installed/utilized on Rails App's best regards, Walther I like using jeweler to create the structure of my gems. It is like Rail's generators but for gems. Try it out: gem install jeweler jeweler my_gem --rspec --cucumber HTH, Ben ___

Re: [rspec-users] Mocking and specing command line (cli) execution, file operations etc. ?

2010-06-07 Thread Ben Mabey
his way as well if you want to see an in-depth example. In general, for simple CLIs aruba is probably the way to go though. This example group is probably best if you want/need to use mocking more to avoid expensive operations. HTH, Ben ___ rspec-use

Re: [rspec-users] mock assertions on block parameters

2010-06-07 Thread Ben Butler-Cole
or? > > If it's the former, you can test it by creating a test double for the > block, and asserting that it's passed to the collaborator > The later. The block gets created by the code under test, so I can't create a double for it. -Ben

Re: [rspec-users] mock assertions on block parameters

2010-06-07 Thread Ben Butler-Cole
object under test because RSpec (understandably) matches its expectations against invocations based on method name and argument matchers. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] (no subject)

2010-06-07 Thread Ben Butler-Cole
at the code, I think it would take some significant changes to support this; but it doesn't seem to be a terribly esoteric use case. Thanks for any suggestions. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] [Code Style] Is there a more 'rspec' way for me to write this test?

2010-05-28 Thread Ben Buckley
(pulled into a separate class because I couldn't work out how to test it). describe TeamCalendar do before do @mock_website = stub("the website").as_null_object @builder = TeamBuilder.new(@mock_website).member("Ben") @hronline = TeamCalendar.new(@mock_w

[rspec-users] Failing test despite "expected" and "got" being identical ...

2010-05-06 Thread ben rooney
being sorted. Many thanks Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Failing test despite "expected" and "got" being identical ...

2010-05-06 Thread ben rooney
Slightly flummoxed on this one. Spec::Mocks::MockExpectationError in 'ChartEventsController handling GET /chart_events should find all chart_events given a value' expected: ([:all, {:conditions=>["value LIKE ?", "%chart_event%"]}]) got: ([:all, {:conditions=>["value LIKE ?", "%chart_event

Re: [rspec-users] Running code on error

2010-04-30 Thread Ben Mabey
l be passed to you for inspection. If that doesn't suit your needs you will have to decorate 'it' on ExampleGroup. -Ben On Apr 29, 7:31 pm, Pat Maddox wrote: Could you share a bit more about what you are actually trying to achieve? On Apr 28, 2010, at 1:51 PM, Ryan S w

Re: [rspec-users] File creation

2010-04-28 Thread ben rooney
Rick Many thanks - I think the idea of breaking out the actual file writing from the code generation is a great one. I don't need to test File I/O - I think I can assume that that works just fine... Many thanks for your help Ben ___ rspec-

Re: [rspec-users] Rack::Test + cookies + rspec

2010-04-23 Thread Ben Prew
Ben Lovell wrote: > On 16 April 2010 15:59, Ben Lovell wrote: > >> Try: >> >> post 'whatever', {}, {'rack.session' => {:something=>'value'}} >> >> To put things through the session with rack test/sinatra. >> >>

[rspec-users] File creation

2010-04-22 Thread ben rooney
el to see if I am in the Test environment and generate a different file, but putting code into my model to pass tests doesn't seem a very, well, sensible thing to do. Anyone been there, done that? Ben ___ rspec-users mailing list rspec-users@rubyforg

Re: [rspec-users] Rack::Test + cookies + rspec

2010-04-16 Thread Ben Lovell
On 16 April 2010 15:59, Ben Lovell wrote: > Try: > > post 'whatever', {}, {'rack.session' => {:something=>'value'}} > > To put things through the session with rack test/sinatra. > > Sent from my iPhone > > Hmm, hold up, that isn'

Re: [rspec-users] Rack::Test + cookies + rspec

2010-04-16 Thread Ben Lovell
Try: post 'whatever', {}, {'rack.session' => {:something=>'value'}} To put things through the session with rack test/sinatra. Sent from my iPhone On 16 Apr 2010, at 15:20, David Chelimsky wrote: > On Apr 16, 2010, at 8:49 AM, Nicholas Wieland wrote: > >> On Apr 16, 2010, at 3:12 PM, David C

[rspec-users] Scaffold views spec failing

2010-04-08 Thread ben rooney
y => stub_model(Category, :name =>"category", :live => true, :id => 1) ) ] And lo - it all works! Hurrah. So if anyone else is as much as an idiot as me (unlikely, but you never know) that is what you do. Ben ___

[rspec-users] Scaffold views spec failing

2010-04-06 Thread ben rooney
rspec (1.3.0) lib/spec/runner/example_group_runner.rb:22:in `each' rspec (1.3.0) lib/spec/runner/example_group_runner.rb:22:in `run' rspec (1.3.0) lib/spec/runner/options.rb:152:in `run_examples' rspec (1.3.0) lib/spec/runner/command_line.rb:9:in `run' rspec (1.3.0) bin/spec:5 ) Any help v much appreciated ... Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Spork

2010-03-31 Thread Ben Mabey
that is) I think it makes sense from a maintenance point of view to have Spork responsible for that. I'm still thinking it over though so if someone has a concrete idea of how to switch the dependency and what advantages it would bring I'm all ears. :) -Ben If I'm w

[rspec-users] How to stub a has_many relationship in Rails 2.3.5

2010-03-24 Thread Ben Fyvie
configure_dependency_for_has_many method that calls: "#{reflection.primary_key_name} = \#{record.#{reflection.name}.send(:owner_quoted_id)}" Any help would be greatly appreciated! Ben Fyvie ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How to test an app with multiple databases?

2010-03-08 Thread Ben Mabey
e know if it works. If it does I could add support to DatabaseCleaner so you can select which AR DB connections you want to clean. HTH, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] adding to the callbacks that rspec-rails adds

2010-02-16 Thread Ben Fyvie
the app fails because it doesn't load test unit. So my question is where can I put this code so that it will always be included when running rspec? Thanks! Ben Fyvie ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforg

Re: [rspec-users] testing named_scope

2010-01-23 Thread Ben Mabey
... end On the topic of RSpec as a form of documentation has anyone used the yard-doc rspec plugin? It appears to be pretty limited ATM but seems very cool with a lot of potential. Just like Ioke's docs it embeds the specs as part of the documentation with the option to

[rspec-users] running specs on JRuby w/nailgun

2010-01-21 Thread Ben Mabey
specs). Has anyone solved this problem to get lightning fast specs on JRuby just like we can with MRI and Spork? Thanks, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Cucumber generator

2010-01-12 Thread Ben Lovell
Try gem install cucumber-rails In a recent release the generators were split from the main project. Sent from my iPhone On 13 Jan 2010, at 06:38, Onno van der Straaten > wrote: Hi, I'm new to RSpec and Cucumber and I'm following the RSpec book. I have cucumber gem installed but when I use

Re: [rspec-users] Problem with should_not when passing a multipleargs to a matcher

2010-01-07 Thread Ben Fyvie
any" If this is indeed what you are suggesting, I think this would be great! Not only does it add the functionality we are looking for but the method names are self documenting and much easier to understand what functionality to expect from each one. Ben Fyvie _

[rspec-users] Problem with should_not when passing a multiple args to a matcher

2010-01-06 Thread Ben Fyvie
xception really should be raised if you try to use "should_not" in combination with passing a collection to a matcher. At the very least there needs to be some documentation to inform RSpec users that tests will not always fail as they might expect when using "should_not" in combination with a matcher that accepts multiple args. 2. If this is not desired behavior then of course we need a fix. I apologize if this has been brought up previously; I did as much searching on this issue as possible. Thanks in advance! Ben Fyvie ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Fwd: [ANN] Announcing MountainWest RubyConf 2010

2009-12-07 Thread Ben Mabey
FYI, MWRC 2010 is accepting presentation proposals now (see link below). I've been to this conference every year and it has been great each time. If you have anything you would like to present please send in a proposal. :) -Ben Begin forwarded message: From: Mike Moore Date: Dec

Re: [rspec-users] Spec helper configuration problem

2009-11-27 Thread Ben Mabey
dding a sort call like so: Dir[File.dirname(__FILE__) + "/support/**/*.rb"].sort.each {|f| require f} HTH, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] spec_helper getting reloaded after specs run under Textmate/Spork

2009-11-23 Thread Ben Mabey
e to duplicate your experience, but I don't have any initial thoughts about why this would be happening. Hmm.. I can't think of why this would happen either. Tim Harper is a textmate user so if you post this question to the spork mailing list he could probably

Re: [rspec-users] testing Rake tasks with FakeFS

2009-11-01 Thread Ben Mabey
Jake Benilov wrote: Hello Ben, Hi Jake, I hope you don't mind but I am copying this response to the rspec-users list in case any one else is able to shed more light on it. I have a bit of a newbie question regarding fakefs; I want to test Rake tasks using fakefs and

Re: [rspec-users] cyclomatic complexity

2009-10-29 Thread Ben Lovell
ld I use > another tool ? > > How can I do this? > This is slightly off-topic, however, you should take a look at saikuro [0] for cyclomatic complexity. Or metric_fu [1] for the whole nine yards. [0] http://saikuro.rubyforge.org/ [1] http://metric-fu.rubyforge.

Re: [rspec-users] [BDD] View specs and cucumber -- duplication of effort?

2009-10-28 Thread Ben Mabey
mple form submission and checking the presence of some basic text is well within the bounds of what Cucumber should be testing. If you are finding you want to write "Then I should see.. And I should see.. And I should see., etc" that is an indication that a view spec *may* be helpfu

Re: [rspec-users] Can't figure you why I am getting deliver_from == Nil Using EmailSpec

2009-10-22 Thread Ben Mabey
r = (email.from || []).first @actual_sender.eql? @expected_email_addresses end On the email you are testing can you call 'from' on it and see what it returns? -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] controller code doesn't seem to be called within rspec test

2009-10-21 Thread Ben Lovell
2009/10/21 Alexander Seidl > Alexander Seidl wrote: > > i call current_user in the index-method, but the test fails and says: > > "# expected :current_user with > > (any args) once, but received it 0 times" > > > > Why? > &g

Re: [rspec-users] Mailing list for BDD?

2009-09-27 Thread Ben Mabey
Ed Howland wrote: Sorry for the cross post, but does anyone know of a list dedicated to just BDD? Seems like all the discussion is happening over on rspec-users, some on the tdd list. My interest is in the abstract concept of behavior driven design/development, as expressed by Dave Astels and Da

Re: [rspec-users] Problems while loading 'spec/stubs/cucumber'

2009-09-15 Thread Ben Mabey
u are just wanting to play around with rspec matchers in IRB then the top three requires is all you will need. So, you could say: require 'rubygems' require 'spec' require 'spec/expectations' 42.should == 42 HTH, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] running rake spec:remote

2009-08-25 Thread Ben Mabey
ded changes in that file. HTH, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] arbitrary handling of received messages in mocks

2009-08-25 Thread Ben Mabey
r you need to do here. end Foo.new(@api).decode hsh end end -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] undefined method 'mock'

2009-08-23 Thread Ben Mabey
lp will be appreciated. Please post the failing spec and your spec_helper.rb. Without those it is hard for us to diagnose the problem. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] [Cucumber] testing emails with celerity - the best solution

2009-08-23 Thread Ben Mabey
om/liangzan/action_mailer_cache_delivery/tree/master http://github.com/liangzan/email-spec/tree/master I plan on merging the above into email spec soon. Even if you are not using email-spec then the above libs would be helpful. -Ben ___ rspec-use

Re: [rspec-users] Sharing code and still keeping a "only commit if all is green" discipline

2009-08-20 Thread Ben Mabey
That all make sense? Cucumber actually ships now with some additional rake tasks to help with this: rake cucumber # Alias for cucumber:ok rake cucumber:all # Run all features rake cucumber:ok # Run features that should pass rake cucumber:wip # Run features that are being worked on

Re: [rspec-users] specify a port for DRB

2009-08-12 Thread Ben Mabey
so harder to document the use of constants, whereas the the options already have a convention. For the sake of consistently I would rather see them be specified using options. Does anyone else have a preference or argument for using env vars? BTW, thanks for doing this. :) -Ben

Re: [rspec-users] [cucumber] table.hashes

2009-07-28 Thread Ben Mabey
future: http://groups.google.com/group/cukes Thanks, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] On Mocks vs Stubs in the context of rSpec

2009-07-24 Thread Ben Mabey
Rick DeNatale wrote: On Thu, Jul 23, 2009 at 8:41 PM, Ben Mabey wrote: You can, IMO, use a "mock" like a stub and a "stub" like a mock.. Take this for example: describe "#some_method" do it "delegates to some_obejct" do some_object = stub('som

Re: [rspec-users] How detailed should error scenarios be?

2009-07-24 Thread Ben Mabey
Ben Mabey wrote: Nathan Benes wrote: I'm fairly new to cucumber and rspec but so far am falling in love with both. I've read up on several different articles concerning these testing tools including the 'beta' BDD rspec/cucumber book. I saw this thread here: http://www.

Re: [rspec-users] On Mocks vs Stubs in the context of rSpec

2009-07-24 Thread Ben Mabey
Marcelo de Moraes Serpa wrote: Thanks David and Ben for the comprehensive replies! I really appreciate it :) These wikipedia articles helped me to understand on the more conceptual level: http://en.wikipedia.org/wiki/Method_stub http://en.wikipedia.org/wiki/Mock_object So, if I understand it

Re: [rspec-users] How detailed should error scenarios be?

2009-07-24 Thread Ben Mabey
ated specs on a lower level are still very valuable and for me provide a great deal of confidence when used along side some happy-path full-stack tests. (And even then you can never test everything...) Thats my current take on things at least... HTH, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] On Mocks vs Stubs in the context of rSpec

2009-07-23 Thread Ben Mabey
ocks::Methods#stub. That call will stub out the provided method and return value... So my_stub.stub(:foo, "bar"), however that is aliased from #stub! which is used most often. This is all from memory so I could be wrong but that is the general gist of it. HTH, -Ben

Re: [rspec-users] My very fist spec file (not sure what's wrong..)

2009-07-21 Thread Ben Mabey
that it is *the* way of doing things. This is what the book recommends IIRC so you are understanding it. -Ben Thanks Chris On Jul 21, 9:25 am, internetchris wrote: Ben that worked perfectly I appreciate the help. Stephen, I appreciate the encouragement, it feels daunting to be learn

Re: [rspec-users] My very fist spec file (not sure what's wrong..)

2009-07-20 Thread Ben Mabey
street").and_return(mock_model(Accrount)) Notice the "and_return" at the end? That way a mock_model of Account will be returned from the new call so that the controller can set it to @account and save it. To see some examples of RSpec controller specs you can use a generator to

Re: [rspec-users] [ANN] rspec 1.2.8 Released

2009-07-16 Thread Ben Mabey
t the examples in this cucumber feature for it: http://github.com/dchelimsky/rspec/blob/1420b6f02f5fe2ba97286d895b8215617f80d4a6/features/matchers/define_matcher_with_user_customizable_message.feature Thanks for the release. -Ben * result.should be_nil, "expected result to be nil&quo

Re: [rspec-users] ZenTest, RSpec and Ruby 1.9.1

2009-07-11 Thread Ben Mabey
ems? Also, are you using the "autospec" command that comes with RSpec? -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] loading custom matchers into cucumber

2009-07-08 Thread Ben Mabey
;t looked closely at how the new matcher DSL adds the matchers but I would think that would work. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Noob syntax questions regarding rspec book...

2009-07-07 Thread Ben Mabey
g each line within @messenger.string Chris, FYI, a good resource to learn and play around with reg exps in ruby is: http://rubular.com/ -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Test doubles: expect "x" and don't care about anything else

2009-06-29 Thread Ben Mabey
his, but for the benefit of others... Pat made a change a while back that makes it so the stubbed return value will still be returned even if an expectation is added. Meaning, assuming the stub is in the before block, you can change the expectation to: Comment.should_receive(:find).with(123)

Re: [rspec-users] Integrate or isolate views?

2009-06-28 Thread Ben Mabey
Jesse Crockett wrote: Ben Mabey wrote: On Jun 28, 2009, at 8:32 AM, Jesse Crockett wrote: When I use integrate_views, can I write view spec in what would otherwise be isolated controller spec? Correct, by default RSpec's controller specs will not render the view. This a

Re: [rspec-users] Integrate or isolate views?

2009-06-28 Thread Ben Mabey
a lot of stuff going on which is hard to set up all in one integration test (or Cucumber scenario). Since the majority of views are very simple then verifying them just in Cucumber is good enough, IMO. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing with activerecord at ThoughtWorks (Stubbing vs real DB)

2009-06-27 Thread Ben Mabey
t let there model tests hit the DB. (And thus are not "real" unit tests by some people's definition) -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] [Cucumber][Webrat] Using LinkLocator in cucumber step definitions

2009-06-23 Thread Ben Lovell
How about: response.should_not have_selector("a", :content => 'New item') Note this is gmail code and untested :) Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Where to put macros

2009-06-22 Thread Ben Mabey
spec/spec_helper.rb: Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f} What would folks think if that was included in the generated spec_helper in spec-rails? Just as I said there was no written convention... :) I lik

Re: [rspec-users] Where to put macros

2009-06-22 Thread Ben Mabey
.extend(MyMacro, MyOtherMacro) end HTH, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] The problem with learning RSpec

2009-06-18 Thread Ben Mabey
e is messy. One that I haven't tackled yet but will have to soon is how to test code that runs as a BackgrounDRb worker. I came up with solutions for all of this (except for the BDRb stuff), but I'm not entirely sure of their quality. They certainly feel hackish, but I can't put my

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Ben Mabey
MMV. FWIW, I question the value of such specs... but that is the macro approach. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Ben Mabey
can use instance variables to pass values to the shared examples, though, right? At your own risk, yes, of course :) If you do go down that route, I recommend method calls instead of instance variables. That way it will yell out you when you forget to define one. :) -Ben cheer

Re: [rspec-users] Spork and Merb and rSpec

2009-06-15 Thread Ben Mabey
x27;d suggest filing a bug on their tracker, wherever it may lie. Scott Spork uses github issues. Also, FYI, spork has it's own mailing list: http://groups.google.com/group/sporkgem -Ben ___ rspec-users mailing list rspec-users@rubyforg

Re: [rspec-users] The problem with learning RSpec

2009-06-13 Thread Ben Mabey
Stephen Eley wrote: Ben and Rick, Thanks very much to both of you for the encouraging responses. Your reply, Ben, came just in time as I was starting to wonder if I had made a complete and irrevocable ass of myself. On Fri, Jun 12, 2009 at 10:36 AM, Ben Mabey wrote: In general though I

Re: [rspec-users] The problem with learning RSpec

2009-06-12 Thread Ben Mabey
ce the answers to questions are so context specific. Anyways, I gotta run, but I those were some of the thoughts I had. Thanks, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Given/When/Then blocks on Cucumber

2009-06-05 Thread Ben Mabey
rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users BTW, please use the new Cucumber ML for cucumber related posts: http://groups.google.com/group/cukes -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Given/When/Then blocks on Cucumber

2009-06-05 Thread Ben Mabey
o: Searching for Hello World Given I go to "http://www.google.com"; When I fill "q" textbox with "Hello World" And I click "btnG" button Then I see "Hello World - Google Search" title But I should not see "Whatever" -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Disabling cucumber for autotest

2009-05-28 Thread Ben Lovell
peculiar. I'm not seeing the same behaviour with autotest-mac. My scenarios won't run unless I specify AUTOFEATURE=true first. Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Disabling cucumber for autotest

2009-05-28 Thread Ben Mabey
Ben Johnson wrote: Hi, For some reason, no matter what, my entire cucumber suite is ran after every auto test. Is there a way to make auto test ignore cucumber all together? Thanks for your help. Hi Ben, The default behaviour is for it to not run the features at all. In fact Cucumber

[rspec-users] Disabling cucumber for autotest

2009-05-28 Thread Ben Johnson
Hi, For some reason, no matter what, my entire cucumber suite is ran after every auto test. Is there a way to make auto test ignore cucumber all together? Thanks for your help. Ben Johnson Binary Logic W: www.binarylogic.com E: bjohn...@binarylogic.com 1430 Broadway 7th Floor - NECO

Re: [rspec-users] DeepTest with 1.2.6?

2009-05-28 Thread Ben Mabey
ble to get it to run but on a single machine with two workers (for it's two cores) and it ran considerably slower than just running rspec alone. I tried it on a brand new app and saw the same results. Support was added for RSpec but I highly doubt anyone really used it in real life. I w

Re: [rspec-users] thoughts on this?

2009-05-27 Thread Ben Mabey
e publication of _The RSpec Book_ will help with these types of misconceptions. It has in it, IMO, the culmination of a lot of thinking behind what BDD is and will be a great reference to point people to who are grappling with understanding BDD regardless of progra

Re: [rspec-users] Cucmber Step to insert Test Data into Database

2009-05-27 Thread Ben Mabey
nserted into the database. Smita. Hi Smita. Please use the new Cucumber google group for new threads about Cucumber: http://groups.google.com/group/cukes When was the decision made to split off the cucumber group? Scott http://rubyforge.org/pipermail/rspec-users/2009-May/014502.html -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Ben Mabey
Scott Taylor wrote: On May 26, 2009, at 2:31 PM, Ben Mabey wrote: Scott Taylor wrote: On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey <mailto:b...@benmabey.com>> wrote: Well, so Spork was really created with testing in mind. It i

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Ben Mabey
Scott Taylor wrote: On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey <mailto:b...@benmabey.com>> wrote: Well, so Spork was really created with testing in mind. It is more general purpose than spec_server though. You can use it

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Ben Johnson
Mark Wilden wrote: > On Sun, May 24, 2009 at 10:17 PM, Ben Mabey wrote: > Spork seems to have the same problem that I have with spec_server: it > doesn't reload classes I change. So if I'm doing TDD between a model and > its > spec, it doesn't help. > > ///

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-24 Thread Ben Mabey
Scott Taylor wrote: Ben Mabey wrote: Scott Taylor wrote: Ben Johnson wrote: Did anyone ever figure out the factory_girl / machinist issues? I am having the same problems and can figure out how to fix it for the life of me. The first run works fine, then afterwards I get a bunch of these

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-23 Thread Ben Mabey
Scott Taylor wrote: Ben Johnson wrote: Did anyone ever figure out the factory_girl / machinist issues? I am having the same problems and can figure out how to fix it for the life of me. The first run works fine, then afterwards I get a bunch of these errors: No blueprint for class Venue

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-22 Thread Ben Johnson
Did anyone ever figure out the factory_girl / machinist issues? I am having the same problems and can figure out how to fix it for the life of me. The first run works fine, then afterwards I get a bunch of these errors: No blueprint for class Venue Any ideas? Thanks! -- Posted via http://www.

  1   2   3   4   5   6   >