search for: pergesu

Displaying 20 results from an estimated 233 matches for "pergesu".

Did you mean: merges
2006 Dec 20
16
Edge RSpec on Rails...what did I forget?
Started a new Rails project, and installed RSpec and the Rails plugin vendor/plugins/rspec (svn://rubyforge.org/var/svn/rspec/trunk/rspec) - 1332 vendor/plugins/rspec_on_rails (svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/vendor/plugins/rspec_on_rails) - 1332 Generated the rspec file, created a model...the spec runs fine if I do ruby spec/models/foo_spec.rb. Running rake though gives
2007 Mar 14
5
What''s the new syntax for predicates?
@settings.should allow_publish_ip("127.0.0.1") fails with undefined method `allow_publish_ip'' for #<#<Class:0x2f8fd48>:0x2f5a968> @settings.should_allow_publish_ip("127.0.0.1") works fine This is rspec 0.8.2. http://rspec.rubyforge.org/documentation/expectations.html says that matching arbitrary predicates is deprecated and to see
2007 Nov 12
15
it "should [action] ..." vs it with an active voice
I''d like to start gathering information/debating on the advantages/disadvantages of using it "should ..." vs other techniques. Dan North explained why we should use should: http://dannorth.net/introducing-bdd/ I used to use it "should ..." for the projects I was on, until I was challenged by a fellow developer who started using it with an active voice. For example
2006 Jul 22
12
Community request - can someone show me REST?
I mentioned this in another thread, but I''ve got a formal request now. After reading tons of stuff about REST, I don''t really get it. I need to see an example. I''d like someone to write up an example blog app with these requirements - RESTful using the simply_restful plugin (or edge rails) - allows posting of comments to articles - has categories for posts No need
2007 Feb 07
5
Mocking ActiveResource
I want to use ActiveResource in my app. Instead of hitting server though, I want it to load from a file when I call find. Any clue how I do that? Pat
2006 Nov 03
10
[PLUGIN] rspec_resource_generator - RESTful scaffold generator with RSpec specifications
rspec_resource_generator ======================== By Pat Maddox Use this generator to generate RESTful scaffolding with RSpec specifications. Syntax is exactly the same as the scaffold_resource generator: ./script/generate rspec_resource ModelName [field:type field:type] When you run this generator, it will create a migration, model, and model spec file. In addition, it gives you a RESTful
2005 Dec 12
9
Webrick is being stupid...no info on a brand new project
I created a project, made a migration, generated scaffolding...start up webrick and I get nothing. To simplify things, I just started another project and generated a controller, still getting nothing. The index page loads fine, but nothing beyond that. If I go to anything that should give me a 404, the page is just blank. The Webrick console just says a 500 (nothing explaining why), and
2007 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which looked like specify "should render abc123" do controller.should_render :text => "abc123" get :key end With 1.0.0, the new spec is it "should render abc123" do get :key response.should render_text("abc123") end However it doesn''t work, giving me the error: undefined
2005 Dec 22
0
Lighttpd/fastcgi config - what does "the error-handler was not found" mean?
...nnections.c.1385) returning the original status 404 2005-12-22 12:38:14: (connections.c.1387) If this is a rails app: check your production.log The config is: $HTTP["host"] =~ "(www\.)?pregopoker\.com" { server.port = 80 server.document-root = "/home/pergesu/www/pregopoker.com/hhconv/public/" server.error-handler-404 = "/dispatch.fcgi" server.errorlog = "/home/pergesu/logs/pregopoker.com/lighttpd-error.log" accesslog.filename = "/home/pergesu/logs/pregopoker.com/lighttpd-access.log" server.indexfiles...
2006 Jun 07
6
I want to stick my models in a module
I''ve got enough models now that I''d like to separate them into modules. For example, I have the class Player that I want to stick in the Trainer module. I''ve changed the definition to class Trainer::Player I''ve created a models/trainer dir, test/unit/trainer, and test/fixtures/trainer. Change the PlayerTest class to be Trainer::PlayerTest. I get the
2005 Dec 21
6
Rails without a db - how to run tests
I''m writing a simple app that doesn''t need to use a database. I added :active_record to the config.frameworks -= line in environment.rb file. This lets me run ./script/generate fine without complaining about no connection. However if I try to run a functional test, it complains about no connection being established. Well...I don''t want a connection to be established.
2007 Sep 04
7
Rake tasks getting in the way of edge (uses gem instead)
So I''d been running gem releases of rspec for the past several months, and I installed edge rspec so that I can use Story Runner. I''m running into a problem because I''ve got a couple rake tasks that reference "spec/rake/raketask". If I try to run "rake spec" then it pulls in the gem version instead of the plugin version. rake blows up saying that
2007 May 04
5
Problems with mongrel_cluster 1.0.1.1 on FreeBSD
I''m running FreeBSD 6.1 and installed the 1.0.1.1 mongrel_cluster prerelease. I had a problem with the mongrels not stopping, and it turns out it''s because ps is reporting my processes as just [ruby18] instead of someting more like "mongrel_rails start -d ......." Not sure why it''s doing that, but it is. Any ideas? For the time being I just changed line
2007 Feb 23
4
How can I spec this? The method gets passed a block...
I''m using Jim Weirich''s Builder library. The code I want to spec is xml.video do xml.id @video_id xml.views @views xml.date(@date.to_s) if @date end I''d like to mock it, rather than asserting that the XML is the right string. I can do one spec: specify "should create a video tag" do @mock_builder.should_receive(:video)
2006 Apr 01
3
Can I do a redirect in an ajax request?
I''ve got a form on my page, and when the user submits it, sometimes I''d like to update an element on my page, and sometimes I''d like to redirect the browser to another url entirely. However if I do redirect_to, it just updates the element with the results of the redirect. Is it possible to do what I want, or will I need to use RJS to do this? Pat
2006 Jan 19
3
lighttpd config on os x
I finally got around to installing lighttpd on my mac for dev work, followed the instructions at http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger When I go into my rails app and type "./script/server" I get the following errors: baggio:~/work/teore pergesu$ ./script/server => Booting lighttpd (use ''script/server webrick'' to force WEBrick) => Rails application started on http://0.0.0.0:3000 => Call with -d to detach (requires absolute paths in config/lighttpd.conf) => Ctrl-C to shutdown server (see config/lighttpd.conf fo...
2005 Dec 22
4
Switchtower problem - `sysread'': bignum too big to convert into `long'' (RangeError)
I''m trying to set up switchtower, following the info in the Manual, but am getting this error when I run "rake remote_exec ACTION=setup": servers: ["cantona.dnswatchdog.com"] /usr/lib/ruby/gems/1.8/gems/net-ssh-1.0.3/lib/net/ssh/transport/packet-stream.rb:203:in `sysread'': bignum too big to convert into `long'' (RangeError) from
2007 Apr 09
7
RCov results seem to include the spec files
I saw the RCov page at http://rspec.rubyforge.org/tools/rcov.html and decided to add it to my project. My rakefile looks like this: require "rake" require "spec/rake/spectask" desc "Run all specs with RCov" Spec::Rake::SpecTask.new("spec:rcov") do |t| t.spec_files = FileList["spec/**/*_spec.rb"] t.rcov = true end When I run rake spec:rcov,
2006 Dec 24
6
What do you think of this controller spec?
Here''s a controller spec I wrote, it''s for a very simple RESTful controller (well, aren''t all RESTful controllers simple? :) I''ve created a couple spec helper methods to refactor some of the common code...for example, require_login_and_correct_user creates two specifications: one for when the user isn''t logged in, and one when the user is logged in but
2006 Mar 19
3
How can I access an attribute via a symbol?
In my model I''d like to write a method that accesses the attributes by name. A very simple implementation would be class MyModel < ActiveRecord::Base def get_value(attribute) return value_of_attribute end end Then I can call it with m.get_value(:name) to get the value of the name column in the db. I''m not sure what to put in for