similar to: Translating tests

Displaying 20 results from an estimated 6000 matches similar to: "Translating tests"

2006 Oct 11
1
Retiring test2spec?
Hi all, We''re thinking about retiring the test2spec translation tool because it''s becoming a maintenance problem. Is anyone using it? Would anyone miss it if it went away? Aslak
2008 Jan 18
5
How do I pass form values from POST controller specs?
Hi there I just started my first Merb app and I''m running into some weird things in Specs. When I do: describe "create action" do it "should create a new project" do project_params = {:name => ''bekkunin''} Project.should_receive(:create).with(project_params) controller, action = post(''/projects'', :project
2007 Jun 08
20
When to use BDD/TDD w/ external libraries
Test First Development is great...But should you use it when you are adding classes/methods on to external library that doesn''t have an extensive test suite? I noticed that the rspec plugin for autotest has no specs. David Chemlinsky said something to the list a while back that has been stewing in my subconscious - that you develop software differently using Test First
2007 Apr 25
9
Running specs for a plugin - undefined method ''define'' for object
I''m trying to write specs for a plugin I''m developing named audit_fu, and I''m running into a problem which I can''t get past it. I''ve got the same specs setup in the main rails app, and everything works fine there, it''s just running the plugin specs that I''m having a problem with. My setup is: - edge rails - edge rspec (in
2007 Apr 11
13
View Specs Fail with "protected method render"
I''ve got rspec and zentest installed as well as the rspec rails plugin, and my model/controller specs all pass and work well. I can''t seem to get views to work though - 100% of the specs fail with: NoMethodError in ''/users/show.rhtml should render attributes in <p>'' protected method `render'' called for
2007 May 03
2
Note of praise
I don''t mean to litter the mailing list with junk, but I just wanted to say thanks to everyone who''s been working on rspec for this release. I particularly like your attention to natural language and thorough documentation/examples. I''m not at the point yet where I can contribute much to the code side of things, but if there were a donate button I would use it. Jeff
2007 Sep 02
17
A Proposal To Magically Remove ''params''
I have a magical proposal for the anti-magic web framework. Controller methods do not use arguments and yet expect arguments. This is handled through this params hash because we don''t know in advance what parameters a client could pass to Merb. But in almost every instance, it is too much to know all the query parameters - one doesn''t care if the user threw in an extraneous
2007 Dec 13
2
Trying to use ActiveRecord STI but fails
Hi all, I''m wondering about my sanity here. There''s probably something simple I overlooked. First off, I have close to zero experience with Merb. 1. I configured use_orm :activerecord in config/dependencies.rb; 2. I have a file named app/models/measurement.rb which looks like this: class Measurement < Observation end 3. I have another file named
2006 Oct 28
5
RSpec, REST and different formats
Is anyone using RSpec with RESTful rails apps? In my rails controllers I check request.respond_to? and render different views accordingly. I noticed that the get method in the rails plugin doesn''t accept headers: controller_mixin.rb line 92 def get(action, parameters = nil) @request.env[''REQUEST_METHOD''] = ''GET'' process action,
2007 Aug 12
1
Test::Unit to RSpec Converter
Hey, just posting in case this is of interest. I just recently wrote a Rails plugin to convert Rails Test::Unit cases to RSpec. http://www.davidjrice.co.uk/articles/2007/8/12/ruby-on-rails-plugin- test-unit-to-rspec-converter it''s not going to work 100% in every case, but it''s really helped me convert old tests to the lovely RSpec :) Best, Dave --- David Rice
2006 Oct 31
5
How to run edge RSpec (on Rails)?
I''m interested in tracking edge development of the RSpec on Rails plugin and I''m a bit confused. The installation guide (http://rspec.rubyforge.org/documentation/rails/install.html) says, "You''ll have to install the RSpec core gem first." It also says, "Take note of what rspec version you''re installing ? it''s very important that you
2007 Aug 27
3
Testing c code with rspec?
Hey all, Has any one ever tested or try to test c code with rspec? I am using system calls to my compiled c program and testing against the standard output but I would like to get a lot more granular than this. I have experimented with using RubyInline to test individual functions and that works on functions that are not calling other c functions. I have some other ideas on how to do this
2007 May 04
2
Custom Matcher and NAME NOT GENERATED annoyance
Hello RSpec users, Have been using RSpec since 0.8.2 (not too long ago, I must say). and been creating my custom matchers since was defined as "good practice". Also, auto-generated names for the examples is very helpful, I''m trying to take advantage of it. Since I often prior code/define all the "examples", I have created a few matchers to fulfill associations and
2006 Oct 21
2
Usage Error
rake spec seems to work fine, but I keep getting a usage error at the end of the spec run: /usr/local/bin/ruby -I"/usr/local/lib/ruby/gems/1.8/gems/rspec-0.6.4/ lib" "/usr/local/lib/ruby/gems/1.8/gems/rspec-0.6.4/bin/spec" Usage: spec [options] (FILE|DIRECTORY|GLOB)+ --diff Show unified diff of Strings that are expected to be equal when
2006 Nov 07
7
should_redirect_to in advance - feels unnatural
I can understand that it''s easier for rspec to set up a mock in advance of the controller call. But it makes it difficult to do something like: context "The HarkController, given Louie the logged-in user" do setup do post :login, :username => ''louie'', :password => ''atest'' end specify "should redirect Louie to the home
2008 Jan 27
20
OT local version control?
Hi, all, This isn''t about rspec, but this list has people whose opinions I respect. So, I''m looking for a new version control system for my local development. I was going to install subversion, but I''ve heard rumors of people using some newer ones. Thoughts? I''d like to be able to run it either locally or on a home server. If I run it off a home server, then
2006 Jun 11
7
testcase_setup_and_teardown_with_blocks (aka "The plugin with the very long name")
Hey all, I got annoyed recently that I couldn''t specifiy multiple chunks of test setup and teardown code that get executed for each test. You''re currently limited to just one setup method (unless I''m much mistaken). Anyway, I just wrapped up my solution in a plugin. The answer: use blocks! class Test::Unit::TestCase # This is overridden by the subclass and will
2006 Jul 30
2
options_from_collection_for_select & multiple columns
I have a table with first_name and last_name, and wan''t to populate a drop-down with the id and the person''s name consisting of the first and last names concatenated together. Can''t figure out how to tell options_from_collection_for_select to do that. Any ideas? I basically need to do something like: <%= options_from_collection_for_select @media_creators,
2006 Jul 31
2
add title to links
Hi, below is an example of one of my links, in order to create a pop up css window when I hover over it, I need to be able to add a title element, <%= link_to ''Edit Details'', :action => ''edit'', :controller =>''account'',:id => @user.id %> so it will appear like <a href="http://localhost/edit/1" title="text
2007 May 07
1
attachment_fu seems to be searching the wrong location for my images
I just installed attachment_fu and for some reason, it seems to be looking in the wrong location for my images. I have a Product model that belongs to a photo model. the photo model has the attachment_fu installed and configured like so: class Photo < ActiveRecord::Base has_attachment :content_type => :image, #Allow standard image formats :path_prefix