Re: [rspec-users] RSpec with devise test helpers

2013-10-22 Thread Zach Dennis
Can you provide a gist of your spec helper, controller spec, and controller implementation? On Wed, Oct 16, 2013 at 3:17 PM, Paul Ols wrote: > I've set my Rails (engine) project to include devise and other tools > like FactoryGirl. > I'd like to write some tests with contexts around anon/authen

Re: [rspec-users] Preferred way to predict behavior in controller spec?

2012-05-04 Thread Zach Dennis
On Fri, May 4, 2012 at 7:14 PM, Patrick J. Collins wrote: > So, I have an action like this: > >  def destroy >    if purchase.user == current_user && purchase.refund >      redirect_to purchase >    else >      flash[:error] = t("purchases.refund.failure") >      render :show >    end >  end > > .

Re: [rspec-users] Simple code dosn't work

2012-04-11 Thread Zach Dennis
On Wed, Apr 11, 2012 at 12:47 PM, Alex Chaffee wrote: j.even?should be true > >>> j.even?.should be true > >> j.even?.should be_true > > Not to ignite a flame war, but this is my biggest problem with RSpec: Unless > you're an expert at Ruby syntax already, it's really easy to make > punctuati

[rspec-users] [OT] Using Git / Pivotal Tracker? Want improved open source tooling around the two?

2012-04-02 Thread Zach Dennis
We're taking a survey for Git / Pivotal Tracker integration related to open source tooling. There's been a certain pain point in the tools that are out there or that lack integration (or flexibility to easily add integration). If you're using both would you be kind enough to check out this survey?

Re: [rspec-users] issue with running of following code

2012-03-20 Thread Zach Dennis
On Tue, Mar 20, 2012 at 6:45 PM, Ankita wrote: > I am running by going into specific file folder on command prompt and > writing ruby file_name.rb to run it... You'll see less headache if use the "rspec" command instead of ruby to run your specs: rspec file_name_spec.rb Or, is there a reason

Re: [rspec-users] Asserting on a yield

2012-03-17 Thread Zach Dennis
On Sat, Mar 17, 2012 at 7:52 PM, Justin Ko wrote: > > On Mar 17, 2012, at 3:51 PM, Myron Marston wrote: > >> I've been thinking about this a bit ever since Zach Dennis brought up >> the issue on another rspec-expectations ticket [1]. I've come up with >>

Re: [rspec-users] Can some one please explain why one of those two examples fails?

2012-03-15 Thread Zach Dennis
On Thu, Mar 15, 2012 at 8:46 AM, Mohamad El-Husseini wrote: > Thanks, Mike. I appreciate the explanation. It's tricky knowing what runs > when, and what variable is in what scope. It seems like "code smell" to add > an instance variable to the before block. > > I don't understand what advantage on

Re: [rspec-users] Sufficiently tested?

2012-03-09 Thread Zach Dennis
On Fri, Mar 9, 2012 at 8:06 AM, U. M. wrote: > Hi everybody, Hello! > > I have a general question about how many different cases have to be > covered in one Example. > > Considering the famous Fizzbuzz program, you should test if your output > is either "Fizz", "buzz", "Fizzbuzz" or just the num

Re: [rspec-users] how to refactor signin process for re-use?

2012-03-09 Thread Zach Dennis
On Thu, Mar 8, 2012 at 10:38 PM, David Chelimsky wrote: > On Thu, Mar 8, 2012 at 5:15 PM, S Ahmed wrote: >> In my authenticate_pages.spec (requests) I do the following to test if the >> signin worked: >> >>  describe "with valid information" do >>       #let(:account) { FactoryGirl.create(:accoun

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Zach Dennis
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 Zach On Wed, Mar 7, 2012 at 12:56 PM, Matt Wynne wrote:

Re: [rspec-users] testing sessions

2012-03-04 Thread Zach Dennis
On Sun, Mar 4, 2012 at 4:46 PM, S Ahmed wrote: > great thanks. > > should a var created in a block be reachable outside the block? Nope, not unless you defined the variable outside of the block to start with. > > it "" do >   expect { session = Session...   }.not_to change(Session, :coun

Re: [rspec-users] Testing Signin for Admin_Employee

2012-02-26 Thread Zach Dennis
On Sat, Feb 25, 2012 at 9:25 AM, J. B. Rainsberger wrote: > On Thu, Feb 23, 2012 at 22:45, Justin Ko wrote: > >> Hello, what you want is "shared examples/context": >> https://gist.github.com/1894922 > > I commented there, too. I commented there as well. -- @zachdennis http://www.continuousthink

Re: [rspec-users] RSpec Requestable Examples

2012-01-30 Thread Zach Dennis
re working well for you and my thinking is persuasive, then so be it, just keep on doing what helps you craft good software. Zach On Mon, Jan 30, 2012 at 11:46 PM, Zach Dennis wrote: > On Sun, Jan 29, 2012 at 3:04 PM, Lenny Marks wrote: >> >> On Jan 27, 2012, at 9:56 PM, Zach Den

Re: [rspec-users] RSpec Requestable Examples

2012-01-30 Thread Zach Dennis
On Sun, Jan 29, 2012 at 3:04 PM, Lenny Marks wrote: > > On Jan 27, 2012, at 9:56 PM, Zach Dennis wrote: > >> I would be interested to hear any thoughts from the community about >> the ability to request specific examples from a shared example group >> as express

Re: [rspec-users] RSpec Requestable Examples

2012-01-28 Thread Zach Dennis
On Sat, Jan 28, 2012 at 5:56 PM, David Chelimsky wrote: > On Fri, Jan 27, 2012 at 8:56 PM, Zach Dennis wrote: >> I would be interested to hear any thoughts from the community about >> the ability to request specific examples from a shared example group >> as expressed in

[rspec-users] RSpec Requestable Examples

2012-01-27 Thread Zach Dennis
mples Git repository: https://github.com/mhs/rspec-requestable-examples -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com @zachdennis (twitter) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/ma

[rspec-users] Looking for a fellow human: Agile, Mobile, Web, Rails Developer

2011-07-28 Thread Zach Dennis
human-agile-mobile-web-rails-developer -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) http://ideafoundry.info/behavior-driven-development (first rate BDD training) @zachdennis (twitter) ___ rspec-

[rspec-users] class/type coercion in ruby blog post

2011-01-26 Thread Zach Dennis
Not to spam, but I a colleague did a write up on coercion in Ruby, and I thought it was interesting and fresh, so I thought I'd share with the community: http://mutuallyhuman.com/blog/2011/01/25/class-coercion-in-ruby -- Zach Dennis http://www.continuousthinking.com (personal)

Re: [rspec-users] How to specify current directory for specs?

2010-11-09 Thread Zach Dennis
icular example group. A third option might be to make this work for both your rake task and when running specs individually: require File.join(Rails.root, "spec/data/book") Hope this helps, Zach Thanks in advance! > > Daniel > ___ > rspec-users mailing list > r

Re: [rspec-users] Why does this stub doesn't work?

2010-10-24 Thread Zach Dennis
.rb:18 > > Finished in 0.0016 seconds > 1 example, 1 failure > > Any ideas? > > Bye > > Haim Ashkenazi > > > > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listin

Re: [rspec-users] new syntax question and mocking HTTP_AUTHORIZATION

2010-10-21 Thread Zach Dennis
Q==' } I haven't written a Sinatra app in a while, but I hope this helps, Zach > > I don't have any personal experience w/ Sinatra yet (I know, I know, but > there are only so many hours in a day), so I'll leave it to someo

Re: [rspec-users] Good practices on spec'ing views?

2010-05-05 Thread Zach Dennis
ecs. In The Rspec Book, section 24.6 (chapter 24), "When I write view specs" offers some tips for determining when to write view specs. Have you read this section? Zach -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) http

Re: [rspec-users] [Cucumber:4095] Cucumber vs, RSpec

2010-04-22 Thread Zach Dennis
d feedback. > I want feedback in 10 seconds rather than 10 minutes. > > The best mantra I have for using Cucumber & RSpec in harmony is, "RSpec > lets me know my code works right, Cucumber lets me know my code is doing the > right work." > +1

Re: [rspec-users] [Cucumber:4066] Cucumber vs, RSpec

2010-04-22 Thread Zach Dennis
ecisions in that regard so I feel like my encouragement and observations are still accurate and relevant. And as Joseph said it's all project, client, and context specific. My 2 cents. :) -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) http://ide

Re: [rspec-users] get to a different controller

2010-01-07 Thread Zach Dennis
examples, although it isn't always practical (clean interfaces are always practical, what isn't is creating new specs with test classes). Some modules are simply a grouping of certain behaviour that relies on other behaviour existing on an object. Creating a new test class to put in a spec

Re: [rspec-users] Cucumber and IP PBX testing

2009-11-19 Thread Zach Dennis
_____ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) http://ideafoundry.info/behavior-driven-developm

Re: [rspec-users] ruby file.spec?

2009-11-12 Thread Zach Dennis
On Thu, Nov 12, 2009 at 10:28 PM, Stephen Eley wrote: > On Thu, Nov 12, 2009 at 8:36 PM, Zach Dennis wrote: >> >> You want to use "spec" to run files directly. If you have your heart >> set on running files from "ruby" then you'll need to load &

Re: [rspec-users] ruby file.spec?

2009-11-12 Thread Zach Dennis
n/scat.rb/ruby/ruby-talk/334942 ) but it should work on 1.9.x. ruby -rubygems -rspec -rspec/autorun file_spec.rb -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) http://ideafoundry.info/behavior-driven-development (first rate BDD training) @za

Re: [rspec-users] Model spec for file upload with paperclip and fastercsv

2009-11-11 Thread Zach Dennis
.com/. > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.

Re: [rspec-users] Stub named_scope with params

2009-11-05 Thread Zach Dennis
atever it was that pulled up this page was working (I like scenarios for pagination as well). To make things easier I would assign the default PER_PAGE to a configuration setting or a constant so it can be easily changed in a scenario. This can reduce scenario running time and necessary setup whilst st

Re: [rspec-users] spec-ing private methods?

2009-10-15 Thread Zach Dennis
27;re dealing with different responsibilities which might push you to extract a new object, or if you're dealing with logic that goes together (in which you might keep well-named private methods), or if you want to pull out some of the dry and boring math calculations out into a method on some

Re: [rspec-users] spec-ing private methods?

2009-10-14 Thread Zach Dennis
/ashleymoran > http://aviewfromafar.net/ > > > > > > > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >

Re: [rspec-users] Grabbing the controller name before a new test case

2009-10-01 Thread Zach Dennis
of tests automatically. Problem is I can't figure out > how to do it outside of my "it" block. > > Any help is greatly appreciated. > > Richard > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rub

Re: [rspec-users] describe block proc parameter as alternative to before blocks?

2009-09-21 Thread Zach Dennis
as come up, and I've not >> > included it before because I want to avoid assigning specific meaning >> > to keys in the hash passed to describe(). rspec-2 will be using that >> > hash as part of a plugin API, so the more I can leave available, the >> > bette

Re: [rspec-users] describe block proc parameter as alternative to before blocks?

2009-09-21 Thread Zach Dennis
g.new } >> end >> >> This is not the first time your idea has come up, and I've not >> included it before because I want to avoid assigning specific meaning >> to keys in the hash passed to describe(). rspec-2 will be using that >> hash as part of a plugin API,

Re: [rspec-users] explanation of "describe" vs "context"...

2009-07-11 Thread Zach Dennis
as not started"d o it "should allow a player to join" end context "when the game has started" do it "should not allow another player to join" end end end > > > ___ > rspec-user

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

2009-07-01 Thread Zach Dennis
p://www.ruby-forum.com/. > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hir

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

2009-07-01 Thread Zach Dennis
would be more tedious using cucumber > > +1 +1 as well. The last sentence here really nails it on the head for me, > > Pat > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/l

Re: [rspec-users] Missing template in helper specs with a render

2009-06-06 Thread Zach Dennis
ordering and renders each >> object in it using a specific partial. >> >> Hans >> ___ >> rspec-users mailing list >> rspec-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > >

Re: [rspec-users] Driving Out A View - Am I specifying too much?

2009-06-05 Thread Zach Dennis
vite ..." end end > > Thanks. > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutu

Re: [rspec-users] Does rspec support something like Assumptions in JUnit 4.4?

2009-06-01 Thread Zach Dennis
java.lang.System.getProperty("root") org_root_prop.nil? && org_root_prop.strip.length>0 end ensure_that root_property_is_not_blank do it "" do end end end > > /Morten > ___ > rspec-users mailing list >

Re: [rspec-users] Any way to continue on Assertion Failure

2009-05-30 Thread Zach Dennis
test take ages, you > could use a before(:all) block instead, but that comes with obvious leaky > state disadvantages. > > Matt Wynne > http://beta.songkick.com > http://blog.mattwynne.net > > > > ___ > rspec-users mailing list >

Re: [rspec-users] create_

2009-05-27 Thread Zach Dennis
___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) http://ideafoundry.info/behavior-driven-development (first rat

Re: [rspec-users] thoughts on this?

2009-05-27 Thread Zach Dennis
On Wed, May 27, 2009 at 8:19 PM, Matt Wynne wrote: > http://robertlally.com/post/bdd-not-so-much My response was too long, I just posted to my blog. http://www.continuousthinking.com/2009/5/28/bdd-not-so-much-really I'm serious about the book club though. -- Zach Den

Re: [rspec-users] [webrat] failing feature step when have_selector uses block

2009-05-20 Thread Zach Dennis
this message because you are subscribed to the Google Groups > "webrat" group. > To post to this group, send email to web...@googlegroups.com > To unsubscribe from this group, send email to > webrat+unsubscr...@googlegroups.com > For more options, vis

Re: [rspec-users] List Split

2009-05-18 Thread Zach Dennis
ogrammers who want to use Cucumber to join the RSpec ML. > - Lee > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuou

Re: [rspec-users] Creating an "integration controller" spec

2009-05-15 Thread Zach Dennis
> rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) @zachdennis (twitter) _

Re: [rspec-users] helpers for examples?

2009-05-15 Thread Zach Dennis
On Fri, May 15, 2009 at 12:29 PM, Zach Dennis wrote: > On Fri, May 15, 2009 at 9:04 AM, Denis Haskin > wrote: >> Where's the recommended place to put helper methods & etc for examples? >> I've started putting them in spec/spec_helper.rb but that's go

Re: [rspec-users] helpers for examples?

2009-05-15 Thread Zach Dennis
pec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) @zachdennis (twitter) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Unable to post to an update action in a controller spec

2009-05-14 Thread Zach Dennis
http://guides.rubyonrails.org/routing.html#restful-routing-the-rails-default It should give you a better overview of when/where to use ids, puts, posts, etc. > > -- > Posted via http://www.ruby-forum.com/. > ___ > rspec-users maili

Re: [rspec-users] How To Drive Out AJAX Functionality in Rails' Views?

2009-05-12 Thread Zach Dennis
s in the browser with Selenium, although I know that chapter has not been released yet. -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) @zachdennis (twitter) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] question re: stubbing out validations

2009-05-11 Thread Zach Dennis
't pass any attributes into "widget.new". So, how does it create valid widgets in the actual app? > > Thanks.. > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/l

Re: [rspec-users] Test JSON with Cucumber

2009-05-11 Thread Zach Dennis
a where to start... > Another options is to call #to_xml on the JSON hash returned by #decode, and then use XPath since you seem to already know it, > -- > Bill Kocik > > http://bkocik.net > ___ > rspec-users mailing list >

Re: [rspec-users] rspec_scaffold and mocha

2009-05-08 Thread Zach Dennis
e can get some more input from others in the community as well as the core team. http://rspec.lighthouseapp.com/ > > Thanks in advance! > Jeroen > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.o

Re: [rspec-users] Where to spec authentication and roles-based permissions?

2009-05-08 Thread Zach Dennis
tion on extracting out a should_require_login macro which walks through step by step the same technique I'd use for writing the macro you want. > Cheers, >    Doug. > > ___ > rspec-users mailing list > rspec-users@rubyforge.org

Re: [rspec-users] Using Rails observers and testability

2009-05-04 Thread Zach Dennis
___ >> rspec-users mailing list >> rspec-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > _______ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyfo

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-27 Thread Zach Dennis
gt;> > Easy on my desk top. Not so easy on my phone. >>>> >>>> Bit too used to gmail threads, sorry! >>>>    Doug. >>> >> > > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) @zachdennis (twitter) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Style issue

2009-04-23 Thread Zach Dennis
On Thu, Apr 23, 2009 at 8:11 PM, Zach Dennis wrote: > On Thu, Apr 23, 2009 at 3:59 PM, Mark Wilden wrote: >>  On Thu, Apr 23, 2009 at 12:05 PM, James Byrne wrote: >> >>> When /currency exchange rate transfer file should contain rates/ do >>> found = false

Re: [rspec-users] Style issue

2009-04-23 Thread Zach Dennis
line.match /.*fx_target#{fx_code}.*fx_rate(\d+\.\d{4}).*/ } || fail ArgumentError, "Exchange Rate not found for #{fx_code}" unless found end > > ///ark > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-u

Re: [rspec-users] Depot app, Demeter's law and troubles cleanly spe cing

2009-04-23 Thread Zach Dennis
ubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com (personal) http://www.mutuallyhuman.com (hire me) @zachdennis (twitter) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Select box with Webrat

2009-04-23 Thread Zach Dennis
? Do you only have one select box on the page with that id (hidden or showing, maybe new and/or edit forms) ? > > Mike > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-21 Thread Zach Dennis
On Tue, Apr 21, 2009 at 4:02 AM, Michael Schuerig wrote: > On Monday 20 April 2009, Zach Dennis wrote: >> > I don't agress. Both classes have distinct, although related >> > purposes. RequestCondition implements the translation from request >> > parameters t

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Zach Dennis
On Mon, Apr 20, 2009 at 1:35 PM, Zach Dennis wrote: > On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig wrote: >> On Sunday 19 April 2009, Zach Dennis wrote: >>> On Sun, Apr 19, 2009 at 2:09 PM, Michael Schuerig >> wrote: >>> > On Sunday 19 April 2009, Zach

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Zach Dennis
On Mon, Apr 20, 2009 at 3:27 PM, Michael Schuerig wrote: > On Monday 20 April 2009, Zach Dennis wrote: >> On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig > wrote: > [big snip] > >> I think I am starting to understand what you're after. You want to >&g

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-20 Thread Zach Dennis
On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig wrote: > On Sunday 19 April 2009, Zach Dennis wrote: >> On Sun, Apr 19, 2009 at 2:09 PM, Michael Schuerig > wrote: >> > On Sunday 19 April 2009, Zach Dennis wrote: >> >> On Sun, Apr 19, 2009 at 12:27 PM,

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-19 Thread Zach Dennis
On Sun, Apr 19, 2009 at 6:41 PM, Michael Schuerig wrote: > On Sunday 19 April 2009, Zach Dennis wrote: >> On Sun, Apr 19, 2009 at 2:09 PM, Michael Schuerig > wrote: >> > On Sunday 19 April 2009, Zach Dennis wrote: >> >> On Sun, Apr 19, 2009 at 12:27 PM,

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-19 Thread Zach Dennis
On Sun, Apr 19, 2009 at 2:09 PM, Michael Schuerig wrote: > On Sunday 19 April 2009, Zach Dennis wrote: >> On Sun, Apr 19, 2009 at 12:27 PM, Michael Schuerig > wrote: >> > In a Rails controller I set the scope on a model class in an around >> > filter. I have def

Re: [rspec-users] Depot app, Demeter's law and troubles cleanly specing

2009-04-19 Thread Zach Dennis
der.items.map(&:product) %> And then add a "items/product" partial and spec it in isolation. Spec'ing views (and partials) in isolation gives you the ability to have simpler view specs, and you're able to avoid feeling the awkwar

Re: [rspec-users] Controller spec: testing that scope is set

2009-04-19 Thread Zach Dennis
sers mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How to approach testing automated processing

2009-04-18 Thread Zach Dennis
call #save! > and repeat until finished. > > How have others handled this sort of thing? > -- > Posted via http://www.ruby-forum.com/. > _______ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-use

Re: [rspec-users] DDL Rails 2.3 nested transactions causing problems in specs

2009-04-18 Thread Zach Dennis
PLUGIN SOLUTIONS that DON'T fix spec issues: > http://svn.viney.net.nz/things/rails/plugins/savepoints/ > http://github.com/spint/savepoints/tree/master (github version with added > support for oracle) > > >  HELP, RSPEC COMMUNITY!!! > ___

Re: [rspec-users] AfterCurrentScenario block

2009-04-17 Thread Zach Dennis
http://blog.mattwynne.net >> http://www.songkick.com >> >> _______ >> rspec-users mailing list >> rspec-users@rubyforge.org >> http://rubyforge.org/mailman/listinfo/rspec-users > > _

Re: [rspec-users] [Cucumber] How can I pass an XML block as a parameter?

2009-04-14 Thread Zach Dennis
PE POD - The Science Fiction Podcast Magazine >   http://www.escapepod.org > _______ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinkin

Re: [rspec-users] Mocking: brittle specs and tight coupling?

2009-04-12 Thread Zach Dennis
bhw.translate_tag(element) == 'any' } >    bhw = assemble_BeHtmlWith{ any! :attribute => 'whatever' } >    element = bhw.builder.doc.root >    assert{ bhw.translate_tag(element) == '*' } >  end > > ... > >  def translate_tag(

Re: [rspec-users] Reuse of Cucumber Features

2009-04-09 Thread Zach Dennis
On Thu, Apr 9, 2009 at 3:30 PM, Zach Dennis wrote: > On Thu, Apr 9, 2009 at 2:56 PM, Matt Wynne wrote: >> >> On 9 Apr 2009, at 17:47, Zach Dennis wrote: >> >>> On Thu, Apr 9, 2009 at 9:29 AM, Williams, Wesley >>> wrote: >>>> >>>>

Re: [rspec-users] Testing page layouts

2009-04-09 Thread Zach Dennis
___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com ___ rspec-users mailing list rspec-users

Re: [rspec-users] Reuse of Cucumber Features

2009-04-09 Thread Zach Dennis
On Thu, Apr 9, 2009 at 2:56 PM, Matt Wynne wrote: > > On 9 Apr 2009, at 17:47, Zach Dennis wrote: > >> On Thu, Apr 9, 2009 at 9:29 AM, Williams, Wesley >> wrote: >>> >>> Matt, >>> >>> Hmm, I think this is one way to do it.  I will need t

Re: [rspec-users] Reuse of Cucumber Features

2009-04-09 Thread Zach Dennis
displays the appropriate error >> > > message when invalid, and uses the common rules for parsing. >> But I don't >> > want to copy and paste those scenarios in every feature.  I think >> > > reusing steps as you mention is probably the solution but I'm >> st

Re: [rspec-users] [Rspec] Trying to get rspec to test a controller in a namespace

2009-04-08 Thread Zach Dennis
sponsors" do >>       Sponsor.should_receive(:find).with(:all).and_return([mock_sponsor]) >>       get :index >>       assigns[:sponsors].should == [mock_sponsor] >>     end >> >>    . . . . >> >> end >> >> ___ >> rspec-users mailing list >> rspec-us...@rubyforge.orghttp://rubyforge.org/mailman/listinfo/rspec-users > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] updated to latest gems, rspec not catching flash.now

2009-04-08 Thread Zach Dennis
gt; ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com __

Re: [rspec-users] [Cucumber] Welcome Ben Mabey to the official Cucumber team

2009-04-07 Thread Zach Dennis
to be clear.. I did not say that I was the "cucumber God"... someone > said that to me. :) > > -Ben > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Den

Re: [rspec-users] spec'ing theme views

2009-04-06 Thread Zach Dennis
d local variable or method `render' for > # > themes/my_theme/spec/default/index.html.erb_spec.rb:11: > > any suggestions on how to approach this? Try passing in :type => "view" to your describe. e.g.: describe "your/partial", :type => "view"

Re: [rspec-users] debuggin cucmber script in ruby

2009-04-06 Thread Zach Dennis
sometimes set a global variable to help me flag when to debug, if the code in question gets executed multiple times. e.g. $c = true if my_condition_is_met And then... debugger if $c > -Ben > _______ > rspec-users mailing list &

Re: [rspec-users] Best practices: How small to make > examples?

2009-04-06 Thread Zach Dennis
. > > Obviously, a scenario is not a formal requirements document. > Nevertheless, if what it asserts is too generic, how much benefit is > there in executing it? > > ///ark > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforg

Re: [rspec-users] Best practices: How small to make examples?

2009-04-05 Thread Zach Dennis
e they are trying to express. At least it has when I tried to do that months back. > ///ark > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] [ANN] BDD w/Rails class in June

2009-04-03 Thread Zach Dennis
http://ideafoundry.info/behavior-driven-development Happy rubying, -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Problem with Custom matcher and Blocks

2009-04-02 Thread Zach Dennis
e. While I don't agree that 99% is a rule of thumb I can see where different apps have different needs, and some will naturally drive out more of the UI from the scenarios, whereas others will have details to the UI which may not be the driving force of the feature and its scenarios, but they ne

Re: [rspec-users] Good introduction to rspec

2009-04-01 Thread Zach Dennis
have undergone extensive change since > many of the episodes were recorded. Thanks for sharing James. I know when you first joined the list there were a few frustrating moments, and it's really good to hear about where you've come and how you've gotten there. This is

Re: [rspec-users] RSpec makes me want to write better code

2009-03-31 Thread Zach Dennis
to your project. The alternative is that you make uninformed decisions and you or other developers will suffer down the road because you made a bad decision but didn't know it because you lacked the knowledge and/or experience to know it was a bad decision. > > Best regards, > -- > P

Re: [rspec-users] RSpec makes me want to write better code

2009-03-31 Thread Zach Dennis
On Tue, Mar 31, 2009 at 1:10 PM, Zach Dennis wrote: > On Tue, Mar 31, 2009 at 5:39 AM, Fernando Perez wrote: >> Fernando Perez wrote: >>> Hi, >>> >>> Today is a big day. I officially transitioned from manually testing by >>> clicking around in my ap

Re: [rspec-users] [Rails] specifying that a layout yields?

2009-03-30 Thread Zach Dennis
o it "should render the context given" do render :text => "foobar", :layout => "layouts/application.html.erb" response.should include_text("foobar") end end > > Thanks, > > Brandt > ___ > rspec-users mailing list > rspe

Re: [rspec-users] Cucumber step definitions vs. RSpec examples

2009-03-29 Thread Zach Dennis
xperiencing a skills deficiency? Usually I think it's #1 and then I quickly jump to #2 when I don't get it resolved in 5 minutes of googling. And then I find out a day later it was because of #3 and I needed to go home and practice a little more so I better understood what I was d

Re: [rspec-users] Cucumber step definitions vs. RSpec examples

2009-03-29 Thread Zach Dennis
now when to do or not to do something. Also, the only way to not have something feel like it's taking too long is to know your tools. These things won't just come because you want it to. It takes practice. Remember to practice. http://www.vimeo.com/3756344 -- Zach Dennis http://www.cont

Re: [rspec-users] Cucumber and matcher

2009-03-25 Thread Zach Dennis
> rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] [Cucumber] ANN: Cucumber with pure Java

2009-03-25 Thread Zach Dennis
omparison Ben and Aslak are talking about, but for those of you who are looking for a good little tutorial to walk through and practice with, this one is pretty good if you are somewhat familiar with Cucumber, RSpec, and Ruby, -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Expecting a block to return a specific value

2009-03-21 Thread Zach Dennis
spec IMO, gives things a good home, and allows me to stop looking at content for instance variables dynamically generated by Rails. If interested... http://wiki.github.com/mhs/caching_presenter -- Zach Dennis http://www.continuousthinking.com http://www.mutuallyhuman.com _

Re: [rspec-users] Problem spec'ing ActionMailer with attachment, body not getting rendered.

2009-03-20 Thread Zach Dennis
On Fri, Mar 20, 2009 at 11:11 AM, Zach Dennis wrote: > 2009/3/18 Rick DeNatale : >> I've got a simple ActionMailer::Base subclass: >> class InfoMailer < ActionMailer::Base >> >> def info(user, zip_name) >>     recipients user.email >>

Re: [rspec-users] Problem spec'ing ActionMailer with attachment, body not getting rendered.

2009-03-20 Thread Zach Dennis
|p| p.body(:message => "Here is the Info that you Requested") end end Also when you look at the email you'll have look at its #parts otherwise @the_mail.body is going to returned the body representation of each part concatenated. > -- > Rick DeNatale > > Blog: htt

Re: [rspec-users] Mocking base class methods

2009-03-20 Thread Zach Dennis
mmyUser >>     @dummy.base_class.should_receive(:scope_by_params).with(params, >> options) >>     DummyUser.count_by_params(params, options) >> end >> >> With the above example and Tobi's BaseClassMock module I'm getting >> "undefined meth

Re: [rspec-users] Basic help

2009-03-19 Thread Zach Dennis
s' require 'spec' I have an environment variable set to always load rubygems on my system so I can omit the require of it explicitly in code: RUBYOPTS=-rubygems > > Regards, > P.Raveendran > http://raveendran.wordpress.com > -- > Posted via http://www.ruby-forum.com/. > __

  1   2   3   4   >