On Sunday 19 April 2009, Michael Schuerig wrote:
> In a Rails controller I set the scope on a model class in an around
> filter. I have defined expectations on the model classes, and
> ideally, I would add a further expectation for the scope. Is this
> already possible in some way? How would I go a
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 to #find-options. QueryScope(Builder) fit
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 to #find-options. QueryScope(Builder) fits it in with
> > ActionController and adds syntactic sugar. The
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 Dennis wrote:
>>> >> On Sun, Apr 19, 2
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
>> ensure the scope defined in your query_scope
On Mon, Apr 20, 2009 at 1:26 PM, Michael Schuerig wrote:
> On Monday 20 April 2009, Pat Maddox wrote:
>> In a functional test, create some records that will be in the scope
>> and some that will be out of the scope, hit the page and make sure
>> you only see the ones that you want. I would either
On Monday 20 April 2009, Pat Maddox wrote:
> In a functional test, create some records that will be in the scope
> and some that will be out of the scope, hit the page and make sure
> you only see the ones that you want. I would either do this with
> cucumber, or write a controller spec and verify
In a functional test, create some records that will be in the scope
and some that will be out of the scope, hit the page and make sure you
only see the ones that you want. I would either do this with
cucumber, or write a controller spec and verify that only certain
records show in the the assigns
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
> ensure the scope defined in your query_scope configuration block in
> the controller is used to set the scope o
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, Michael Schuerig
>> >
>> > wrote:
>> >> >
On 20 Apr 2009, at 02:57, Michael Schuerig wrote:
I'd rather check that a particular scope is in effect for a call to
#find. Just as I said. ;-)
As is always the case with spec'ing Rails, I don't know which level of
abstraction is the right one to check, but it seems like what you're
asking
On Monday 20 April 2009, David Chelimsky wrote:
> >> Consider this alternative:
> >>
> >> describe PeopleController do
> >> describe "GET index" do
> >> it "assigns a list of all people filtered by virtual name
> >> attributes" do people = [mock_model(Person)]
> >> Person.stub!(:all).a
On Monday 20 April 2009, Zach Dennis wrote:
> In your original post you asked:
>
>"How would I go about adding support a scope expectation?"
>
> Given the code you've shown it is not clear exactly what you are
> expecting. Do you just want to be able to expect that you call
> model_class.send(:
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, Michael Schuerig
>> >
>> > wrote:
>> >> >
On Sun, Apr 19, 2009 at 7:19 PM, Michael Schuerig wrote:
> On Monday 20 April 2009, David Chelimsky wrote:
>> On Sun, Apr 19, 2009 at 5: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 Monday 20 April 2009, David Chelimsky wrote:
> On Sun, Apr 19, 2009 at 5: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
On Sun, Apr 19, 2009 at 5: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, 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, Michael Schuerig
> >
> > wrote:
> >> > In a Rails controller I set the scope on a model class in an
> >> >
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 defined expectations on the model clas
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 defined expectations on the model classes, and
> > ideally, I would add a further expectation for the
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 defined expectations on the model classes, and ideally, I
> would add a further expectation for the scope. Is this already possible
> in some way? How
In a Rails controller I set the scope on a model class in an around
filter. I have defined expectations on the model classes, and ideally, I
would add a further expectation for the scope. Is this already possible
in some way? How would I go about adding support a scope expectation?
Michael
--
22 matches
Mail list logo