[rspec-users] used the described Class in a shared behavior

2007-08-06 Thread ben
;purr" end end describe SiberianTiger, "(a subclass of BigCat)" do it_should_behave_like "Siberian felines" before(:all) do @klass = SiberanTiger end it "should roar" do @feline.sound.should == "roar" end end Then again, i have a gut feeling that if i took better advantage of modules it wouldn't be an issue... -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

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] 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] 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] 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] [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] 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] 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] 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] 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

[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

[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

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 _

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

[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] 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] 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] 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] 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] 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] 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

[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 ___

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

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'

[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-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. >> >>

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] 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

[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

[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] [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

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] 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] 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 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] 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] 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] 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-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] 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] 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] 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] 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

[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] 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

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] 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
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] 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] 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 ___

[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] Why no rspec-rails gem?

2008-09-27 Thread Ben Mabey
can reuse some of the AR specific helpers in other non-rails AR projects.) So +1 on making it a public gem (at least just on github.) -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Shoulda

2008-09-30 Thread Ben Mabey
etter performance. (I have not tested that assumption at all.) -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Spec for 'an array should not include an item'

2008-09-30 Thread Ben Mabey
_ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users Also, what is your data? The matcher may not work as expected due to nuances in your data. For example, STI tends to m

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-10-01 Thread Ben Mabey
cause all of the other textmate bundles on github that I'ved used have followed the same convention. That makes sense if, like you said, they just relaxed the naming rules. Thanks, Ben ___ rspec-users mailing list rspec-users@rubyforg

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-10-01 Thread Ben Mabey
Ben Mabey wrote: Matt Wynne wrote: Is it possible to rename the project maybe? I know you can have dots in the name - e.g. http://github.com/thoughtworks/cruisecontrol.rb though I think I may have heard this was a restriction that was lifted relatively recently. I'll look into it. I

Re: [rspec-users] Uninitialized constant Spec:Story

2008-10-06 Thread Ben Mabey
Mark Thomson wrote: FWIW, I'm running Rails 2.1 on Windows. I have tried running RSpec on two completely separate Rails installations on different machines and get the same result. Mark. Please post your stories/helper.rb. -Ben Mark Thomson wrote: Indeed I have. Just re-ran it to

Re: [rspec-users] Uninitialized constant Spec:Story

2008-10-06 Thread Ben Mabey
;spec/story' before the "require 'spec/rails/story_adapter'" line. -Ben dir = File.dirname(__FILE__) Dir[File.expand_path("#{dir}/steps/*.rb")].uniq.each do |file| require file end ## # Run a story file relative to the stories directory. def run_local_story

Re: [rspec-users] Uninitialized constant Spec:Story

2008-10-06 Thread Ben Mabey
laces IMO. We just had a series of rspec releases and I don't know if this would qualify for another emergency fix. WDYT David or Pat? -Ben Ben Mabey wrote: Mark Thomson wrote: stories/helper.rb is as follows - ENV["RAILS_ENV"] = "test" require File

Re: [rspec-users] gem generators on 1.2.6

2008-10-07 Thread Ben Mabey
yforge.org http://rubyforge.org/mailman/listinfo/rspec-users Hmm.. I don't know if that was supported in 1.2.6.. I know having generators in your home dir was. Try this workaround: mkdir -p ~/.rails/generators ln -s /your_gem_path/rspec-rails-1.1.8/generators ~/.rails/generators/rspec-rai

Re: [rspec-users] Mocks: expectations vs spying

2008-10-16 Thread Ben Mabey
g for spy in this groups past threads should give you some links to learn more. HTH -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Cucumber, more examples, tabular data input sets

2008-10-18 Thread Ben Mabey
mple set- I like it. This was actually brought up a little while ago by Evan Light on this list so I think it is something that people naturally move towards. I think this way would be clearer to non-developers as well since the column names would appear in the actual scenario. -Ben __

[rspec-users] Running Cucumber with a Rails Rake task

2008-10-18 Thread Ben Emson
Hi All I've just started experimenting with Cucumber and its great. However I wasn't quite sure how I should integrate it into my Rails application. What I would like to do is set my Rails app up so that I can run a Cucumber rake task using the standard Rails Rake system. I've looked through the

Re: [rspec-users] Running Cucumber with a Rails Rake task

2008-10-19 Thread Ben Emson
line number of > the first Given and run: > > script/cucumber --line 41 --require features/steps > features/path/to/my.feature > > Zach > > > On Sat, Oct 18, 2008 at 4:33 PM, Ben Emson <[EMAIL PROTECTED]> wrote: >> demo Rake file works, but I'm not sur

Re: [rspec-users] Merb

2008-10-19 Thread Ben Mabey
er in merb easy: http://github.com/david/merb_cucumber/tree/master -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Merb

2008-10-20 Thread Ben Mabey
cking down breaks can be harder without the focused object examples. That has been my experience at least and so that is why I like to have application level features which touch the entire stack and then have faster and more focussed object level specs that rely on mocking. Lik

Re: [rspec-users] cucumber feature description

2008-10-25 Thread Ben Mabey
icates the business value best and most succinctly to the customer and you for a given feature is what you should use. HTH, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Working outside-in with Cucumber and RSpec

2008-10-25 Thread Ben Mabey
ll start seeping tiny facets of business logic. :) Oh, and to an earlier point in this thread.. I can't remember the last time I wrote a view spec. Any semi-interesting logic that for some reason needs to be in the view I will place in a helper and then spec that out. +1 on working outs

Re: [rspec-users] Including spec/rails/mocks into other classes

2008-10-29 Thread Ben Mabey
bdevelopment.com/plugins/nulldb With it I am able to maintain my same model factory interface without ever hitting the DB. Using the adapter is nice because you can turn it on or off when you please so you can really hit the DB in the cases that you need to. HTH, Ben ___

[rspec-users] Cucumber and autotest

2008-11-03 Thread Ben Mabey
projects I don't think it fits well with my red->green->refactor cycle. Any ideas on how to disable this on a per-project basis? Thanks for any suggestions, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Ben Mabey
could do a combination of this approach and what Matt suggested. Meaning, you could make a more descriptive "Given" step that simply calls the "GivenScenario State A" internally. Make sense? HTH, Ben 2008/11/4 Matt Wynne <[EMAIL PROTECTED] <mailto:[EMAIL PROTE

Re: [rspec-users] Testing a wizard with Cucumber

2008-11-04 Thread Ben Mabey
Ashley Moran wrote: On Nov 04, 2008, at 6:18 pm, Matt Wynne wrote: You could also use GivenScenario. Dude, that is s "Story Runner". And s deprecated too, right? Oh really? Hmm.. I assumed it was still there. :) -Ben ___

Re: [rspec-users] restful_auth and good rspec examples (was: Caboosers drop RSpec)

2008-11-04 Thread Ben Mabey
s, I have been think this for a while but have done nothing... It has been one of those things on my endless OSS TODO lists. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Caboosers drop RSpec

2008-11-04 Thread Ben Mabey
Pat Maddox wrote: Fernando Perez <[EMAIL PROTECTED]> writes: As a starter, can someone tell me if the specs defined in restful_authentication are clever? Can I learn from them? Because right now I find them overwhelming, complicated, over-testing, etc. I don't even use restful_auth

Re: [rspec-users] Cucumber and autotest

2008-11-03 Thread Ben Mabey
David Chelimsky wrote: On Mon, Nov 3, 2008 at 2:14 PM, Ben Mabey <[EMAIL PROTECTED]> wrote: Hey all, Does anyone know how to disable the cucumber autotest support on a project? With this commit: http://github.com/aslakhellesoy/cucumber/commit/93470e2580b5e3cfe0c8eb3fce86e21bf8afa21

Re: [rspec-users] Cucumber: Why rake features needs to call db:test:prepare?

2008-11-04 Thread Ben Mabey
ication level tests and may be too slow for the regular red->green->refactor cycle that autotest/autospec offers.) -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] how to avoid tests removing data that my migrations put in?

2008-11-04 Thread Ben Mabey
re talking about rspec examples and not cucumber features... -Ben Pat ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users ___ rspec-users mailing list rspec-

Re: [rspec-users] Stubbing times: #from_now et al.

2008-11-05 Thread Ben Mabey
now.utc end Again, using the #remember_me_until method is testing the internal state of the object but without knowing your other methods I don't what the better options (if any) are. HTH, Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] cucumber docs

2008-11-06 Thread Ben Mabey
ee it. Many thanks in advance! Tim ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users Have you seen the github wiki? http://github.com/aslakhellesoy/cucumber/wikis

Re: [rspec-users] [Cucumber] The User Story File

2008-11-07 Thread Ben Mabey
has nice syntax highlighting (thanks to Ben Mabey) that make it look a bit prettier. You can now also get syntax highlighting in vim: http://github.com/bmabey/vim-cucumber/tree/master I would really like to see a non-technical stakeholder try to use vim. :) -Ben On 7 Nov 2008, at 14:24, aidy

Re: [rspec-users] features and form filling - going declarative?

2008-11-07 Thread Ben Mabey
robably aren't the best if they are to be customer facing. I like general/specific. -Ben [1] Programming Language Pragmatics by Michael L. Scott ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Mixing in spec helper methods

2008-11-11 Thread Ben Mabey
ot including, your module (extend AuthSpecHelpers.) You might want to read my post about creating rspec macros as well: http://www.benmabey.com/2008/06/08/writing-macros-in-rspec/ -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyf

Re: [rspec-users] Mixing in spec helper methods

2008-11-12 Thread Ben Mabey
Nick Hoffman wrote: On 2008-11-11, at 19:31, Ben Mabey wrote: Nick Hoffman wrote: I've written a module for my specs that contains a helper method, and am mixing the module into my specs with #include . It seems that the method must be called with an #it block. If it isn't, this err

Re: [rspec-users] Selecting a date with Webrat

2008-11-13 Thread Ben Mabey
time.day, :from => "#{id_prefix}_3i" selects time.hour.to_s.rjust(2,'0'), :from => "#{id_prefix}_4i" selects time.min.to_s.rjust(2,'0'), :from => "#{id_prefix}_5i" end I would use Time.parse to convert the string from the scenario to f

Re: [rspec-users] Selecting a date with Webrat

2008-11-13 Thread Ben Mabey
aslak hellesoy wrote: On Thu, Nov 13, 2008 at 8:20 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: On Thu, Nov 13, 2008 at 1:14 PM, Ben Mabey <[EMAIL PROTECTED]> wrote: Mike Sassak wrote: Hi, I'm writing a scenario that needs to select date values from a form c

Re: [rspec-users] Mocking and stubbing model relationships

2008-11-18 Thread Ben Mabey
d_return(mock_association) mock_association end end end end The you can say stuff like: @user.stub_association!(:properties, :new => mock_model(Property), :find_by_id => mock_model(Property)) HTH, Ben ___ rspec-users mailing list rspec-users@rub

Re: [rspec-users] `add_scenario': wrong, number of arguments (1 for 2)

2008-11-18 Thread Ben Mabey
e was a problem with the ruby example that was recently fixed. If that is not the issue please open a ticket on Lighthouse. -Ben C:\work\cucumber\examples\calculator_ruby_features>rake features (in C:/work/cucumber/examples/calculator_ruby_features) You must gem install win32console to get

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-19 Thread Ben Mabey
? Try doing TRUE in all lowercase. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] RSpec, TestUnit, Cucumber and Autotest

2008-11-20 Thread Ben Mabey
ing the wiki I think what you are seeing is the expected behaviour. I don't think it is suppose to run the features until all your tests are passing. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Mocking and stubbing model relationships

2008-11-20 Thread Ben Mabey
Nick Hoffman wrote: On 2008-11-18, at 15:49, Ben Mabey wrote: Nick Hoffman wrote: Before writing specs for a one-to-many relationship between two models, I did some research and found that some people were creating proxy mocks, and others were using Matthew Heidemann's #stub_associ

[rspec-users] Missing method implementation_backtrace

2008-11-20 Thread Ben Fyvie
s method is for and don't really care that it is gone; however, Netbeans 6.5 does care that it is gone and is not able to run tests without it. As a temporary band-aid I have added the method back locally. I was wondering if someone could enlighten me as to why the method was removed? Than

Re: [rspec-users] [Cucumber] single feature run produces duplicate features in HTMl report

2008-11-24 Thread Ben Mabey
@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users This was a bug that was resolved in 0.1.9 I believe. Try upgrading to that or use edge from github. -Ben ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread Ben Mabey
. While I know some people on this list could provide some first hand experience, I think this post by Bob Martin should provide some good insight: http://blog.objectmentor.com/articles/2007/10/17/tdd-with-acceptance-tests-and-unit-tests - Ben Mabey 2008/11/25 Raimond Garcia <[EMAIL PROTECTED

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread Ben Mabey
David Chelimsky wrote: On Tue, Nov 25, 2008 at 12:52 AM, Ben Mabey <[EMAIL PROTECTED]> wrote: Andrew Premdas wrote: I came across this idea of dropping unit tests for acceptance tests in the java world. It didn't like it there and I don't like it here, but maybe that

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread Ben Mabey
examples%2Ftest_unit%2Ffeatures%2Fstep_definitions%2Ftest_unit_steps.rb The previous gem releases of cucumber required the rspec gem but as of a few commits ago that dependency is only there for developing cucumber. -Ben ___ rspec-users mailing list

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread Ben Mabey
James Byrne wrote: Ben Mabey wrote: The previous gem releases of cucumber required the rspec gem but as of a few commits ago that dependency is only there for developing cucumber. -Ben I see. So, if I understand correctly, rspec is the "default" testing framework? B

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread Ben Mabey
James Byrne wrote: James Byrne wrote: But, if one wished to incorporate minitest say, then one would extend the cucumber world Where does one put this? A the begining of each step_definitions file? In support/env.rb? You only need it once- so the env.rb file is fine and natura

Re: [rspec-users] Spec'ing via features

2008-11-25 Thread Ben Mabey
James Byrne wrote: Ben Mabey wrote: Right. Although, I'm unsure if rspec is even the default framework outside of the rails generators. -Ben Where can one get a handy quick reference of what syntax is acceptable to cucumber by default? Hmm.. I'm not sure what you me

Re: [rspec-users] Variance in behaviour: rake features vs. autotest

2008-11-26 Thread Ben Mabey
st specify the requiring of the features dir because cucumber, by default, only loads the ruby files in the feature's dir and children dirs. So when you have a feature that is in a subdirectory of your main features dir you have to explicitly require the ruby files under features. Mak

Re: [rspec-users] class << self considered harmful... really?

2008-11-26 Thread Ben Mabey
ate < AR:Base def self.names @@names ||= State.all.map{|s| s.name} end end Is that correct? How is using a class instance variable safer from a threading point of view? Do threads not share class instance variables the same way class variables w

  1   2   3   4   5   6   >