When i run a spec file i am getting the following error
D:\Diwakar\spec_diwa\spec\controllers>spec sandbox_controller_spec.rb
c:/ruby/lib/ruby/gems/1.8/gems/rspec-0.5.15/lib/spec/api/sugar.rb:17:in
`method_
missing': undefined method `describe' for main:Object (NoMethodError)
from ./sa
Dear Scott,
I am new to rspec and i am confused to test using it.
Can you please help me with an easy example or link to get clear
about it
Regards
M
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.o
How to solve the below error
1)
NoMethodError in 'LoginController index should get successfully'
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.status
./login_controller_spec.rb:9:
2)
NoMethodError in 'LoginController index should render 202 file'
undefin
rails 2.1.1 and rspec 1.1.8 never worked out for me
So i downgraded rails to 1.2.3.
while execiting ruby /script/generate rspec_controller MyController
it ask rails version 2.1.1.
i was getting the describe method error as mention earlier in using
2.1.1
--
Posted via http://www.ruby-forum.
Scott Taylor wrote:
> On Oct 11, 2008, at 12:42 AM, Mano ah wrote:
>
>> 2.1.1
> Why don't you post your spec? It would be a lot easier to help if we
> could look at the same thing you were looking at.
>
> Scott
sorry spec?
--
Posted
Luis Lavena wrote:
> On Fri, Oct 10, 2008 at 3:56 AM, Mano ah <[EMAIL PROTECTED]> wrote:
>> c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:28:in `ge
>>
>> describe SandboxController,"handling someaction" do
>>
>>@value = somemethod
&
my gem list is
actionmailer (2.1.1, 1.3.3)
actionpack (2.1.1, 1.13.3)
actionwebservice (1.2.3)
activerecord (2.1.1, 1.15.3)
activeresource (2.1.1)
activesupport (2.1.1, 1.4.2)
fxri (0.3.6)
fxruby (1.6.12)
hoe (1.7.0)
hpricot (0.6)
log4r (1.0.5)
rails (1.2.3)
rake (0.8.3)
rspec (1.1.8, 0.5.15)
rs
I followed the below ways of installation
gem install rake
gem install rails
gem install rspec
gem install rspec-rails
rails my-test-app
cd my-test-app
ruby script/generate rspec
When i used
'rake spec'
i received no error.
After that I created a controller
then installed the two plugin
Thank you Pat Maddox,Douglas Adams,Luis Lavena,Scott Taylor for your
kind help.
I have installed the plugins rspec and rspec-rails using git.
I was not running the spec controller from the root thats the main
problem.
I followed all of your useful suggestions and able to build and run a
proj
I want to test the controllers of an existing project. How can i do it.
Actually when I use ruby script/spec rspec_scaffold modelname it
creates a spec controller for that model and a controller inside the app
folder.
So for testing an already existing project how should i proceed.
--
Posted vi
Thank you stephen.
Though it is easy to write spec for controller something stoped me like
I am proceeding the wrong way. Your words gives confidence. so let me
try and get back to you.
--
Posted via http://www.ruby-forum.com/.
___
rspec-users maili
Steph I sucessfully wrote my first test
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
I want to test the basic controller test action and to make
response.should be_sucess method work for it. How can i do
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo
How can i test the action of a controller which requires picture?
I mean, as part of the test I want to pass a picture (somekind of
fixture) and test to see if the result is correct
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
Ramon Tayag wrote:
> You can put that barcode in the spec/fixtures directory. However,
> you'll need to manually place it there.
>
> Ramon Tayag
ok. Also please can i know how to test sending an image using rspec.
--
Posted via http://www.ruby-forum.com/.
Ramon Tayag wrote:
> I suggest doing those tests in the model, not in the controller. Just
> do that fixture thing for the controller spec to pass. But pass the
> same thing in the model. Here's a sample of how I do it
>
> require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
>
Actually i need to test sending a barcode image and also test a value
returned by it.
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
can i know how to test a picture upload which dosent interact with db
my code is
def scan
#---
if request.post?
image = Image.new
image.blob= params[:image][:blob]
image.save_picture
end
--
Posted via http://www.ruby-forum.com/.
__
Nick Hoffman wrote:
> On 2008-11-14, at 06:29, Mano ah wrote:
>> image = Image.new
>>
>> image.blob= params[:image][:blob]
>>
>> image.save_picture
>>
>>end
>> --
>
> Hi Mano. It doesn't really matter whether or no
Thank you
All the above specification passed. Now I want to test the return
value. I mean
def scan
#---
if request.post?
image = Image.new
image.blob= params[:image][:blob]
if image.save_picture
@code = returns a barcode image value
e
20 matches
Mail list logo