search for: context_setup

Displaying 7 results from an estimated 7 matches for "context_setup".

2006 Dec 29
0
RSpecOnRails - setup or context_setup?
...... end end This looks fine, but has one problem: the setup code of the context is executed AFTER the controller has been instantiated, but Configuration.instance.option is needed BEFORE the controllers initialize method is called. One way to work around this, is to move the setup code to context_setup, which apparently gets called BEFORE the controller gets instantiated. In my current situation this works fine, but what if I need to setup something before every specification in a context that needs to be done before the controller is initialized? bye, Tobias
2007 Jan 24
2
hello! first post + context_setup
...enjoying the TDD(BDD) process of creation. I''m currently rspec''ing a finite state machine (acts_as_state_machine). As such, I need to persist the model through ''specifies'' within the context - from top to bottom. I have bumped into a couple of probs: 1. context_setup to define the doesn''t permit access to fixtures. "You have a nil object when you didn''t expect it!" 2. transactions are defined around each specify? For this reason my specifies are very repetitive, encompassing all state movement for all previous contexts...
2007 Feb 26
5
Continuing a "specify" block after failure
I have some high-level acceptance tests that read a bunch of files, process them, and then confirm that the processed output matches the expected output. That is, for each file "a.input" I have a corresponding file "a.expected" and I basically want to churn through all of them producing "a.processed" and making sure that "a.processed" equals
2007 Apr 28
7
[ rspec-Patches-9605 ] Patch for ER 9472, shared behaviour
...ection on Spec::Runner seemed just as bad. > > > > Had to move some methods on module Spec::DSL::BehaviourEval::ModuleMethods from private to protected to faciliate copying things from one EvalModule to another. > > > > There are many combinations of include, setup/teardown, context_setup/context_teardown and inherit that are not covered in the shared_behavior spec. Let me know if you want more. Might be a good place for shared behaviors! > > > > -Bob > > ---------------------------------------------------------------------- > > >Comment By: David Chelims...
2007 Jan 10
7
foo_spec.rb -> foo.rspec (proposed RSpec file name convention)
Is it too late to suggest some filename conventions for example rspec files--especially when bundling with gems? I see spec_foo.rb and foo_spec.rb around. Also found some foo_ex.rb around. Would having a foo.rspec be worth talking about? Or is the convention more or less to have ''spec'' in the file name? I have to confess the only real motivation I have at the moment is syntax
2007 Apr 16
4
before before and after after
Hi all, There are currently a number of ways to extend RSpec that are documented inconsistently and work in sometimes conflicting and/or confusing ways. I''d like to resolve that. The recent addition of Spec::Runner.configure is part of that resolution. The thing I want to tackle now is the stuff that happens before and after each example. Currently (in trunk), things are executed in the
2007 Apr 11
13
View Specs Fail with "protected method render"
I''ve got rspec and zentest installed as well as the rspec rails plugin, and my model/controller specs all pass and work well. I can''t seem to get views to work though - 100% of the specs fail with: NoMethodError in ''/users/show.rhtml should render attributes in <p>'' protected method `render'' called for