On Thu, Oct 23, 2008 at 7:20 PM, Michael Latta <[EMAIL PROTECTED]> wrote:
> It appears we were too clever, but I think this would be a reasonable use of
> stories.
>
> We tried to have a story file run with 2 different sets of steps to use the
> same story against both the UI using selenium and aga
Pat Maddox wrote:
Can you please post an example of the spec and production code that
isn't behaving as you expect?
Pat
Sure, sorry been tied up with business travel this week. Here's my
controller...
class SubscribersController < ApplicationController
def test
file = File.ne
Hi everybody,
1) Does anybody have full working example of how to test partial templates?
2) What the correct place to test partials: controller or view spec? If
controller correct place,
should I use integrate_views?
3) Is it true that expect_render is deprecated and I have to
use should_receive
On Thu, Oct 23, 2008 at 11:20 PM, Michael Latta <[EMAIL PROTECTED]> wrote:
> That works when running one at a time. When I want to run all my specs how
> do I ensure the requires are applied to the appropriate features? It is not
> all my stories, only a subset that are dual-purposed. Do I need
Hi all;
I have several Rails projects where RSpec is working correctly, and
one in which it is not. Running autospec continuously reloads all
files, running my tests over and over again, without making any
changes. Each time it reloads, it runs a smaller subset of specs until
it settles a
That works when running one at a time. When I want to run all my
specs how do I ensure the requires are applied to the appropriate
features? It is not all my stories, only a subset that are dual-
purposed. Do I need to have directories for those that can be run
dual mode and those that ar
On Thu, Oct 23, 2008 at 5:00 PM, Avdi Grimm <[EMAIL PROTECTED]> wrote:
> FWIW, I blogged my answer to this question recently:
> http://avdi.org/devblog/2008/10/21/testing-private-methods/
...and to be a little more concrete, at first glance the way I'd apply
that advice to your code example is to
On Thu, Oct 23, 2008 at 5:16 AM, Bastien <[EMAIL PROTECTED]> wrote:
> Hi everyone,
> Do anyone know if there's a way to spec protected methods ?
> Thanks in advance
FWIW, I blogged my answer to this question recently:
http://avdi.org/devblog/2008/10/21/testing-private-methods/
--
Avdi
Home: htt
On Oct 23, 2008, at 2:58 pm, David Chelimsky wrote:
For rspec-1.1.9 you have to be on rubygems 1.3 to avoid those
dependencies (as they are developer deps and I just used hoe to create
the gemspec, which makes them normal deps for rubygems <= 1.2).
I'll make sure that dep is not there for the
On Thu, Oct 23, 2008 at 1:20 PM, Michael Latta <[EMAIL PROTECTED]> wrote:
> It appears we were too clever, but I think this would be a reasonable use of
> stories.
>
> We tried to have a story file run with 2 different sets of steps to use the
> same story against both the UI using selenium and aga
It appears we were too clever, but I think this would be a reasonable
use of stories.
We tried to have a story file run with 2 different sets of steps to
use the same story against both the UI using selenium and against the
server API using regular get/put/post. This way we could spec the
On Thu, Oct 23, 2008 at 10:00 AM, Bastien <[EMAIL PROTECTED]> wrote:
> Thanks for all your answers.
>
> I was just wondering how about using send in my specs ? It would
> bypass the protected limitation without altering my code :
>
> @survey.send( :sub_total, [EMAIL PROTECTED] )
>
> Is that the kin
Thanks for all your answers.
I was just wondering how about using send in my specs ? It would
bypass the protected limitation without altering my code :
@survey.send( :sub_total, [EMAIL PROTECTED] )
Is that the kind of trickery you were referring to David ? Would that
be bad practice ?
Regards
On Thu, Oct 23, 2008 at 7:43 AM, Ashley Moran
<[EMAIL PROTECTED]> wrote:
> Hi
>
> Can you use RSpec 1.1.9 on JRuby? Now it depends on spicycode-rcov, I can't
> install it:
>
> # jgem install rspec --development
> Building native extensions. This could take a while...
> ERROR: Error installing rsp
On Thu, Oct 23, 2008 at 6:49 AM, Bastien <[EMAIL PROTECTED]> wrote:
> I totally agree with the ''listening to your specs" concepts and
> always divide my code into small methods easier to spec.
> Now let me get you right, here's my code :
>
> class Survey < ActiveRecord::Base
> has_many :participa
Bastien <[EMAIL PROTECTED]> writes:
> I totally agree with the ''listening to your specs" concepts and
> always divide my code into small methods easier to spec.
> Now let me get you right, here's my code :
>
> class Survey < ActiveRecord::Base
> has_many :participants
> ...
> def generate_r
Matt Wynne <[EMAIL PROTECTED]> writes:
> I want to be able to factor out bits of a controller's behaviour into
> modules, and spec them independently. E.g. modules like Authentication
> and ExceptionHandling that are mixed into ApplicationController.
>
> In my spec, I create a FakeController class
On Thu, Oct 23, 2008 at 7:49 AM, Bastien <[EMAIL PROTECTED]> wrote:
> I m already specing the "generate_reports" methods with a mock on
> "sub_total", but I would also like to spec that method. I've put this
> method into protected because it doesn't make sens to call it from
> outside this class.
On Thu, Oct 23, 2008 at 7:00 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
>
> This is working OK, but I'm struggling with the routing so that I can use
> the integration session #get method to spin up my FakeController.
Is that strictly necessary? Your fake controller's never going to get
routed to
Hi
Can you use RSpec 1.1.9 on JRuby? Now it depends on spicycode-rcov, I
can't install it:
# jgem install rspec --development
Building native extensions. This could take a while...
ERROR: Error installing rspec:
ERROR: Failed to build gem native extension.
/opt/local/share/java/jr
I totally agree with the ''listening to your specs" concepts and
always divide my code into small methods easier to spec.
Now let me get you right, here's my code :
class Survey < ActiveRecord::Base
has_many :participants
...
def generate_reports
...
sub_total = sub_total(participant
I want to be able to factor out bits of a controller's behaviour into
modules, and spec them independently. E.g. modules like Authentication
and ExceptionHandling that are mixed into ApplicationController.
In my spec, I create a FakeController class which inherits from
ActionController::Bas
On 23 Oct 2008, at 10:16, Bastien wrote:
Hi everyone,
Do anyone know if there's a way to spec protected methods ?
Thanks in advance
Sorry if this sounds preachy, but I would always advise you to factor
out the code in the method into another class, then test that class.
If the behaviour of
Hi everyone,
Do anyone know if there's a way to spec protected methods ?
Thanks in advance
-- Bastien
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
24 matches
Mail list logo