similar to: Rails 2.0 & rspec edge - not protected_against_forgery?

Displaying 20 results from an estimated 200 matches similar to: "Rails 2.0 & rspec edge - not protected_against_forgery?"

2010 Sep 21
0
Upload form with uploadify jquery plugin
I would like to integrate the uploadify plugin with a standard rails form. However I can''t figure out how to add a new field and have it get submitted with the file upload. I added a name field into the form, but the valued does not get submitted. <% dialog_file_description = ''Photos'' allowed_extensions = [:jpg, :jpeg, :gif, :png] max_size = 20.megabyte
2010 Sep 23
1
undefined method `protect_against_forgery?' for #<ActionView
Hi guys This is a pretty tricky one. I get a "undefined method `protect_against_forgery?'' for #<ActionView::Base:0x569a3d4>" error when trying to generate a partial from ''outside'' the web site. I do this as I have a rake task that checks for changes periodically in the background, and if it then sees a change it rebuilds the partial and posts the result
2007 Jul 24
4
spec''ing helpers that use controller
Hi all, I''m in the process of creating rspecs for my helpers. One of the helpers in app/helpers/application_helper.rb looks like this: def page_name @page_name || "Define @page_name in #{controller.controller_name}::#{controller.action_name}" end The rspec is simply: it "should something" do page_name end
2007 Oct 12
3
Strange mock_model behaviour with ActiveResource model
Hi, I have two models in an app that inherit from ActiveResource::Base. The scaffold controller tests for one of the models works fine, but the other one dies when calling mock_model in the "handling GET /fa_codes" spec: Specifically, the call to mock model here: before do @fa_code = mock_model(FaCode) FaCode.stub!(:find).and_return([@fa_code]) end generates this failure:
2009 Sep 10
1
undefined method `protect_against_forgery?'
When I use plugin ''railstree'' (http://www.hashcode.eti.br/?p=91) as following code: node = Node.new :label => menu_item.name, :link_to_remote => { :base => self, :update => "container", :url => {
2007 Jul 06
3
stubbing helper methods for View specs
Hi there I have several view specs, that include the following snippet in their "before" block to stub the methods by acts_as_authenticated before :each do @u = mock_model(User) @u.should_receive(:name).and_return("Hans Muster") template.should_receive(:logged_in?).and_return(true) template.should_receive(:current_user).and_return(@u) end this
2006 Dec 22
0
[LLVMdev] in Cygwin problems
On Sat, 23 Dec 2006, Roman wrote: > How to solve this problem? Java isn't supported. Use --enable-languages=c,c++ -Chris > $ make > make[1]: Entering directory `/tmp/llvm3/llvm/build/libiberty' > make[2]: Entering directory `/tmp/llvm3/llvm/build/libiberty/testsuite' > make[2]: Nothing to be done for `all'. > make[2]: Leaving directory
2006 Dec 22
5
[LLVMdev] in Cygwin problems
How to solve this problem? $ make make[1]: Entering directory `/tmp/llvm3/llvm/build/libiberty' make[2]: Entering directory `/tmp/llvm3/llvm/build/libiberty/testsuite' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/tmp/llvm3/llvm/build/libiberty/testsuite' make[1]: Leaving directory `/tmp/llvm3/llvm/build/libiberty' make[1]: Entering directory
2008 Feb 02
3
[LLVMdev] Problem Compiling llvm-gcc 4.2
>> Dear All, I have been trying for days but still cannot break this barrier. May I get your help? I have compiled llvm-2.1 successfully and make install. When I proceed with llvm-gcc-4.2-2.1, however, I keep getting linking error as attached. Some functions with totally different content conflict with each other in linking process. That is a Linux box (Debian, with 2.6.23-1
2011 Oct 18
8
rspec 1.3.2, Rails 2.3.14 - plugins not loading
Hi there I have a weird situation. I have inherited a project in Rails 1.2.3 that has been upgraded to Rails 2.3.14 (and is running). I have installed Cucumber and Rspec to start to write features/tests for the new code that needs to be written. In my Gemfile, these Gems are loaded: group :test do gem ''rspec-rails'', ''~> 1.3.4'', :require =>
2007 Aug 27
2
issue with edge rails and urls
I just switched our project over to Edge Rails, and I''m running into this problem with all of my helper methods that call _url methods: NoMethodError in ''ApplicationHelper home_link should generate a valid home link when User.current and Profile.current is not set'' You have a nil object when you didn''t expect it! You might have expected an instance of
2007 Nov 07
1
LoadError when upgraded to latest rspec trunk
I just moved my rspec and rspec_on_rails plugin from r2691 to r2822. After that I upgraded both of them I regenerated all things rspec with the rspec generator. I was running on rails r2691 but upgraded to the latest at r2822 when I was getting errors but that still didn''t help things. I get the following when I try to run a spec with either rake spec or ./script/spec:
2008 Jan 15
1
Problem with running installed package on Windows
Hello, I have installed the package clim.pact in R on both Mac OS X and Windows XP. Everything works fine on the Mac but in Windows, I have a problem when I try to execute some simple commands. I get this error: Error in gzfile(file, "wb") : unable to open connection In addition: Warning message: In gzfile(file, "wb") : cannot open compressed file
2007 Oct 22
13
An error on edge at -r 2767
Morning, Having done an svn up this morning all my specs are broken with the following: SQLite3::SQLException in ServiceConfig with minimum set of valid parameters should return nil for the service path'' SQL logic error or missing database C:/development/sandbox/prototypes/user_admin_client/config/../vendor/plugins/rspec_on_rails/lib/spec/rails/dsl/behaviour/rails_example.rb:17:in
2007 Sep 27
0
fixture_scenarios in trunk
Hi, I saw a previous post from David answering someones question about fixture_scenarios with rspec. Following that I upgraded my rspec and rspec_on_rails to the trunk versions and then installed the fixture scenario plugin. Now whenever I run my (previously passing rspecs) I get the following error for all tests... ... 148) NoMethodError in ''Cart should show a
2010 Nov 29
0
[TDD] [Rails] - Rspec test for application_helper.rb fails when trying to access application_controller method.
In a method named logo in my application helper, I reference an application controller method (current_account) that has been marked as a helper method with the following syntax: helper_method :current_account When I test out the setup in the browser (without rspec), rails is happy with this setup. However, when I run the spec, the spec won''t pass and gives me the following error:
2008 Jul 03
0
Testing HAML in helper rspec
Thought I''d post this under its own heading so others can find it. Thanks to David for the pointers to solve this. Here is the incantation needed to use HAML 2.0 under RSpec 1.1.5 (Needs the .5 for a fix) # application_helper_spec.rb under spec/helpers ... before :each do helper.extend Haml helper.extend Haml::Helpers helper.send :init_haml_helpers end it
2001 Nov 20
0
PATCH: Fixing last/utmpx for Solaris
In case it is any help, here is the patch against openssh-3.0.1p1 that corrects the problem with last reporting on Solaris that I sent to the list a week or so ago against 3.0p1. There was no conversation about this aside from Rip Loomis' comment about including it to support BSM auditing - does this present a problem for other OSes to include the ut_name field in the utmpx entry? Should this
2003 Feb 28
0
[PATCH] Clean up failed login logging.
Hi All. As noted in a previous post, the logging of failed user logins is somewhat spread out. This patch creates a record_failed_login() function in sshlogin.c and moves the AIX and UNICOS code to it, eliminating 3 #ifdefs from the main code. It also provides an obvious place to add the code for any other platforms that support this. I've tested this on AIX 4.3.3. Wendy Palm was kind
2007 Jul 31
11
helper spec not finding rails core helpers
Hi, My helper specs were going ok until I added a call to a rails DateHelper method in one of my helpers http://api.rubyonrails.com/classes/ActionView/Helpers/ DateHelper.html#M000574 The helper runs fine from my view templates, just dies in the spec test. I boiled my question down to a simple (not too useful) example. I''m not sure what I''m missing. #