Displaying 20 results from an estimated 4000 matches similar to: "view.should render_template best practices?"
2009 Jan 09
14
undefined local variable or method `current_user' for
Hi All, I am using a Plugin mdarby-restful_acl with
restful_authentication and I am following the procedure form
http://github.com/mdarby/restful_acl/tree/master , but I am getting some
irritating error "undefined local variable or method `current_user'' for", I
know I am missing something but I dont know what?
Can anybody help me regarding this?
Shahroon
2011 Jan 14
2
Rspec autotest error
Hi all,
I tried testing with Rspec for first time, following a tutorial.
"rspec spec/" works fine but when I try ''autotest'' it gives me the
error message below. I also made a gist about it: https://gist.github.com/779265
It seems like a redgreen or ZenTest error. I''m using Ubuntu10, Rails3,
Ruby 1.9 and RVM. Any help is appriciated, thanks in advance,
gezope
2010 Sep 30
5
response.should have_text leads to undefined method `has_text?'
One of my controllers directly renders some JSON output that I would
like to test with RSpec. For that I use ''response.should
have_text("foobar")'' in my spec file, but that leads to a
Failure/Error: response.should have_text("enim")
undefined method `has_text?'' for #<ActionController::TestResponse:
0xb6736944>
I read here somewhere that webrat
2010 Mar 14
2
autotest & rspec2
Hi guys,
I''m trying to find some information on how to get autotest to run the
rspec2 tests. I have my project setup so "rake spec" runs the specs
properly, but autotest seems to ignore/don''t know that there are specs
to test.
I read on the rspec2 wiki that autotest integration is o be added
eventually. Any ideas on how to achieve this?
Thanks,
Jeroen
2010 Jun 20
10
RSpec 2 view example: render_template
On http://github.com/rspec/rspec-rails under "View specs" there''s an
example
describe "events/index.html.erb" do
it "renders _event partial for each event" do
assign(:events, [stub_model(Event), stub_model(Event)])
render
view.should render_template(:partial => "_event", :count => 2)
end
end
Is this indeed correct? From the
2010 Jul 01
1
using rSpec stub in Cucumber with rSpec2
Hello,
I have a Rails3beta4 project where I want to use rSpec stubs in a Cucumber
feature. Unfortunately it looks like requiring ''spec/stubs/cucumber'' in
env.rb does not work anymore: I get a "no such file to load --
spec/stubs/cucumber (LoadError)" error.
Is it possible to use rSpec stubs in Cucumber with rSpec2? If not, is there
any other viable alternative?
Thanks
2010 Apr 15
11
Rails 3, Rspec 2, Autotest
Trying to set up a Rails 3 project with RSpec and Autotest. I followed
these steps exactly:
http://gist.github.com/365816
But when I start up autotest, I get:
$ autotest
loading autotest/rails
style: Rails
instead of:
$ autotest
loading autotest/rails_rspec2
style: RailsRspec2
And autotest doesn''t seem to do anything. Any idea what''s happening?
I''m using Ruby
2008 Jan 31
11
ZenTest-3.9.0 incompatible with RSpec-1.1.2
Hey all,
Just a heads up that the ZenTest-3.9.0 release is not compatible with
RSpec-1.1.2. I thought I had a release ready to go, but differences
between a preview release of ZenTest that I received and the actual
release seem to have broken compatibility.
We''ll get this resolved soon, but in the mean time please hold off on
upgrading to ZenTest-3.9.0 if you''re using RSpec.
2007 May 28
1
Rails matcher render_template is wrong when using GetText, looking for flexible solution
I have a problem with a mismatch between RSpec Rails and the actual
behavior when using GetText, and would be glad for suggestions how to
best solve this.
When using GetText a failure is reported for the following simplified
specification:
describe SamplesController, "when requesting /samples" do
it "should render index " do
get ''index''
2008 Jan 27
8
Textmate RSpec Bundle ''it'' snippet
It seems to me that the RSpec bundle''s ''it'' snippet is in need of some
love. By default, a newly inserted spec passes. This seems odd as it
is misleading. It also makes it harder find what specs still need to
be completed if you return to an RSpec module after a break.
I propose that the ''it'' snippet is changed to the following:
it
2007 Sep 12
4
Checking out Rspec
I''m getting the following error when i either checkout or update from
svn://rubyforge.org/var/svn/rspec/trunk
svn: Error processing command ''mv'' in
''C:\work\rspec2\RSpec.tmbundle\Preferences''
svn: Can''t move source to dest
svn: Cannot rename file
''C:\work\rspec2\RSpec.tmbundle\Preferences\.svn\tmp\text-base\Symbol List:
2007 Nov 21
6
route_for and nested resources
I can''t figure out how to make the updates to allow for the route_form
method to return a url that matches the expected.
Here is a sample
route_for(:controller => :task, :action => :new).should == "/task/new"
If a task has to be created for a user, how exactly do I do this. The
following doesn''t work:
route_for(:controller => :task, :action => :new,
2011 Mar 02
6
calbacks on models
Hi, I''m having some strange behavior on callbacks when testing with
RSpec2. On my test, when I create a resource using the #create method
the callbacks related to #before_create are not called. If I go to the
console and I try to type the command Resource.create(client_uri:
"http://example.com") all works fine.
There are no mocks around, and I can''t understand if this
2007 Jun 19
5
Problems translating should_render from 0.8.2 to 1.0.5
<font size="2">I''m working on a large Rails site and we want to move from RSpec 0.8.2 to the latest and greatest. So we ran the translator and yet we''re having a lot of trouble translating should_render.<br><br>I found this on the web:<br><br>We will NOT be supporting the following in the new syntax:<br>
2007 Jun 02
7
I''m really bad at controllers, help please.
Hey,
Sorry for so many questions - I''m really bad at this right now.
I''m trying to cover the following code w/ rspec
def index
if params[:user_id]
@user = User.find(params[:user_id])
@messages = @user.messages
end
end
So basically what I''m doing is listing all the messages for a user,
provided there is an id parameter.
describe
2007 Oct 26
3
Specing with Subdomains as Account Keys
How do you go about implementing and rspecing subdomains as account
keys? I''m sure that this must be an issues for others as well.
So I have an app using subdomains as account keys. The Application
Controller sets up @current_company in a before filter. Everything is
done within the context of the @current_company.
After reading about Demeter''s Revenge
2015 Jan 06
3
Radeon graphics problems with CentOS 6.6
On Sat, Jan 3, 2015 at 2:27 PM, Darby Vicker <darby.vicker at gmail.com> wrote:
> On Saturday, December 20, 2014, Darby Vicker <darby.vicker at gmail.com> wrote:
>>
>> I thought about trying centos 7. But in the end that doesn't really
>> help me since I'm trying to keep my current centos 6 installation
>> working. I don't really have the
2014 Dec 21
2
Radeon graphics problems with CentOS 6.6
I thought about trying centos 7. But in the end that doesn't really
help me since I'm trying to keep my current centos 6 installation
working. I don't really have the time/energy to reinstall everyting
under CentOS 7 right now.
I was able to get a 6.6 LiveCD built myself. The liveCD has the same
problem - X doesn't work. I can boot the "Basic Video" option from the
2014 Dec 16
3
broken pipe question
I am running a heartbeat... Asterisk 11.15.0 - same behaviour is noticed on
1.4.43 also
I issue a call through the API that does the below. just UserEvent and
Hangup
-- Executing [s at heartbeat:1] UserEvent("Local/s at heartbeat-0000000f;2",
"HeartBeat, Noop") in new stack
-- Executing [s at heartbeat:2] Hangup("Local/s at heartbeat-0000000f;2",
2007 Oct 01
15
how to spec views
I''m trying to spec a view but haven''t done much view specing.
This view render different partials depending on authentication of the user:
annon, admin, player
So I I''ll write if conditionals in the view with the partials
it "should render signup propaganda for annon users trying to view games"
do
render "/games/index.rhtml"