search for: by_beta

Displaying 1 result from an estimated 1 matches for "by_beta".

Did you mean: try_beta
2011 Mar 18
7
Controller Spec & DataMapper Chaining
...that will include DM query chaining. Here is a very simplified version of the Controller#index I''m working on def index @widgets = Widget.all(:order => [ :name.asc ]) if params[:alpha] @widgets = @widgets.by_alpha(params[:alpha]) elsif params[:beta] @widgets = @widgets.by_beta(params[:beta]) end end I''m trying to write a spec for this and I''m struggling. It feels like it''ll be something uber simple but I''m just not getting it. describe "GET ''index''" do it "should be successful" do get :in...