Hi
I am new to Rspec and try to mock my controller that looks like
def create
@friendship = current_user.friendships.build(:friend_id =>
params[:friend_id])
if @friendship.save
flash[:notice] = "Added friend."
render :text => flash[:notice]
else
flash[:error] = "Erro
Ashley Moran wrote:
On 20 Oct 2009, at 17:36, Carl Graff wrote:
Is it possible to create a stub that returns hash values.
For example I would like to convert this:
@siteItem = stub('plmSiteItem', :one => "uno")
To something like this:
@siteItem = stub('plmSiteItem', {'one' => 'uno', 'two' =>
On Tue, Oct 20, 2009 at 1:44 PM, mikev wrote:
> Any suggestions for what to check when running on windows with:
> rspec (1.2.9)
> rspec-rails (1.2.9)
> rails 2.3.3
> ruby 1.8.6
> spec_server
>
FYI - spec_server is removed from rspec-rails as of 1.2.9 and is no longer
being maintained by me. If a
Any suggestions for what to causes exception: undefined method
`use_transactional_fixtures='
when running on windows with:
rspec (1.2.9)
rspec-rails (1.2.9)
ruby script/spec_server
autospec with --drb option
___
rspec-users mailing list
rspec-users@ruby
Any suggestions for what to check when running on windows with:
rspec (1.2.9)
rspec-rails (1.2.9)
rails 2.3.3
ruby 1.8.6
spec_server
Run autospec with --drb option and get the following exception. Run
autospec or 'spec spec' works fine.
/spec/spec_helper.rb:19: undefined method
`use_transactiona
On 20 Oct 2009, at 19:31, elza.more...@tagview.com.br wrote:
Thank you for your replay. I did not mention that I have a method
called in before_filter to set @user.
before_filter :find_current, :only =>
[:show, :edit, :update, :destroy]
The method is
def find_current
@user = User.find(g
On 20 Oct 2009, at 17:36, Carl Graff wrote:
Is it possible to create a stub that returns hash values.
For example I would like to convert this:
@siteItem = stub('plmSiteItem', :one => "uno")
To something like this:
@siteItem = stub('plmSiteItem', {'one' => 'uno', 'two' => 'dos'} )
So that
Is it possible to create a stub that returns hash values.
For example I would like to convert this:
@siteItem = stub('plmSiteItem', :one => "uno")
To something like this:
@siteItem = stub('plmSiteItem', {'one' => 'uno', 'two' => 'dos'} )
So that I can do this:
@siteItem['one'] should ==
Hi all!
I'm testing some named scopes. I use be_all(&:some_predicate) to test
if all the elements in the collection are valid, which works, but when
I try to test the inverse, it fails.
You can see the complete code at: http://gist.github.com/213636
But in short:
subject = User.active
subject.s
http://pastie.org/pastes/661816
hi,
please have a look at my code. Perhaps anybody knows a solution for that
problem.
Attachments:
http://www.ruby-forum.com/attachment/4165/pastie-661816.txt
--
Posted via http://www.ruby-forum.com/.
___
rspec-users ma
10 matches
Mail list logo