similar to: Story adapter and SQLite Was:What command to run all stories?

Displaying 20 results from an estimated 5000 matches similar to: "Story adapter and SQLite Was:What command to run all stories?"

2007 Nov 15
5
What command to run all stories?
Hi, I''ve been following this thread and I can get the example stories to run with the ruby command. But I''ve been unable to get the example from http://blog.davidchelimsky.net/articles/2007/10/25/plain-text-stories-part-iii to run with all.rb ruby stories/all.rb /home/edh/story/stories/additions/steps/addition_steps.rb:2: undefined method `steps_for'' for main:Object
2007 Jan 12
2
After upgrade to 0.7.5, specs are now using the development, not the test DB
Hi, After I upgraded RSpec from 0.7.4 to 0.7.5, first the gem, then the Rails plugin, I noticed that when I ran my spec/models, the fixtures were overwriting the data in the development environment DB, not the test one. The test environment was being used prior to the upgrade. I am using SQLite3 and an in-memory db for the test environment. Any help would be appreciated. Thanks Ed -- Ed
2008 Jun 02
2
get method under 1.1.4 in Stories is undefined
HI, After I upgraded to RSpec 1.1.4 (from git), my stories all failed. I was using Webrat and the first thing I noticed was the ''visits'' method was gone. I then backtracked to just using ''get'' and got the same undefined method exception. I confirmed it was still working in 1.1.3 Eventually, I got it to work doing this: in my first Given: @app =
2007 Jun 21
3
Sqlite3, in-memory db and rspec_server
Hi everyone. I can''t get the above(subject line) combination to work. If I use a standard sqlite3 file db for the test db, and spec_server all the specs on my models pass. If I use an in-memory db for the test db, script/spec w/o spec_server, they all pass. But if I use in-memory and spec_server I get the following error: 1) ActiveRecord::StatementInvalid in ''User should be
2007 May 10
2
Problem with translator
Hi, Just installed 0.9.4 (from 0.8 series) and ran the spec translator. It messed up specs that had the should include() where the argument to include is a string (using no parens for the arg) IOW, given: context "OldSchool" do class OldSchool attr_accessor collection def initialize @collection = [] end def add_new(item)
2007 Sep 14
2
Mocks in StoryRunner
Hi, I''m trying to get up and running with StoryRunner. I have a story that looks something like the following, but the call to mock_model produces the exception listed below. Am I just misunderstanding the concept? Are mocks not meant to be used in stories like this? Or is this a bug? Changing @user to be an actual AR object makes things run without error. ENV["RAILS_ENV"] =
2007 Sep 19
1
Strange error in StoryRunner (was: Mocks in StoryRunner)
Hi, I''m posting this stack trace again because it keeps popping up, seemingly as the ''default error'' when something is wrong with my story code; for instance, I got it when I referenced a variable in my ''Given'' that I had forgotten to pass into the block. Now I''m getting it when I attempt to post to a login action: And ''user is
2007 Jun 02
2
Unit tests breaks with sqlite
Hi, I''m using an sqlite3 database with Rails and have some trouble running unit tests What I''ve done is * rails my_app * edited database.yml to use sqlite3 adapter, db/my_app_development and db/my_app_test * ruby script\generate model user * edited model class User < ActiveRecord::Base validates_presence_of :name validates_uniqueness_of :name end *
2008 Mar 04
10
Pretty story output for non-Rails project
I''m taking my first fledgling steps driving a new ruby (non-rails) project with BDD. I''ve got a (test) story working. However, when I run the story in TextMate (via command-r), the output is plain text. See: http://skitch.com/georgeanderson/8grg/run-examples How do I get the output to look pretty (formatted)? rspec-1.1.3 OS X 10.5.2 TextMate v1.5.7 (1455) Thanks, /g --
2006 Oct 25
5
Mocha, Stubba and RSpec
Hi, I''ve been reading with interest the threads trying to integrate Mocha and Stubba with RSpec. So far, I''ve made the two changes in spec_helper.rb suggested, but discovered another one that neither of the archives mentions: If you use traditional mocking: object = mock or the stub shortcut : object = stub(:method => :result), you run into namespace conflicts with
2007 Mar 01
1
Problems with RC1 & Rails Controllers
I''m now using the 0.8.0 RC1 gem and have the same version of rspec and rspec_on_rails checked out into my vendor/plugins directory. I''m having a problems with controllers... I''ve generated a controller using the ./script/generate rspec_controller MyController. When I try to run the rake spec:controller task I get the following: euclid% rake spec:controllers (in
2007 Mar 27
10
sqlite3 and rspec_on_rails tests
As I think I previously mentioned, there is an incompatibility with rails 1.2.1 and sqlite3 3.3.8. see: http://weblog.rubyonrails.org/2007/1/29/using-sqlite3-with-rails and: http://weblog.rubyonrails.org/2007/2/6/rails-1-2-2-sqlite3-gems- singular-resources Sqlite is now at 3.3.13. Because of this, if a developer is trying to create a patch for rspec_on_rails, he will have one of the
2006 Jul 26
4
MasterView rails-optimize (x)html friendly template engine - Release 0.2.4
MasterView is a rails-optimized (x)html friendly template engine plugin that provides another option to the existing rails view templates (rhtml and rxml). The main idea is to provide a template engine that would provide all the power of layouts, partials, and rails helpers but still be editable/styleable in a WYSIWYG editor. It was also a major goal that the syntax of these attribute directives
2005 Dec 22
13
in-memory SQLite for testing
I am following the rails book, and arrived to the section about testing. The test database is configured as: test: adapter: sqlite3 database: ":memory:" and I get this error with the simple product test: % ruby test/unit/product_test.rb Loaded suite test/unit/product_test Started E/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/ errors.rb:94:in
2006 Aug 10
4
I need "validates_presence_of" help
Hi - I have 3 fileds a user can fill out. They can fill out 2 of them or just one of them, for example. fill out these 2 fields: Field1 and Field2 Or fill out this field: Field3 In my model how do I use validates_presence_of for Field1 and Field2 or just Field3. I want to do something like this: validates_presence_of Field1, Field2 OR validates_presence_of Field3 So the user can fill out
2007 Oct 16
3
One-Click Ruby Installer 186-26 Release Candidate 1
This updates Ruby to 1.8.6 patch level 111 (lots of bug fixes since 1.8.6 was released). It also updates most of the included extensions to their latest versions (see the change log). The final release won''t happen until after RubyGems 0.9.5 is released (which should be any day now) because we want the latest RubyGems version to be included. However, we''re putting out this
2007 Nov 20
1
How to represent Story of Life grid in Then clause
In this story from Dan''s Game of Life: Scenario: the grid has three cells Given 3 x 3 grid When I create a cell at 0, 0 And I create a cell at 0, 1 And I create a cell at 2, 2 Then the grid should look like: XX. ... ..X How do you set up matchers for the grid at the end. Are all the indented lines after a Then passed to the Then matcher as separate
2006 Sep 11
1
Aliasing type method in Mocha
Hi, (Mocha and Stubba are great, btw.) Is there any way to alias the call to .type in Mocha? The issue is that AR effectively aliases the normal type method for the Column class (for whatever Adapter.) My code is reflecting on the adapter methods to iterate over the columns in a particular model. This makes it hard to write test code that stubs out columns and mocks my models. E.g. cols =
2006 Oct 16
3
Strange ActiveRecord error popping up
Hello guys, I''m developing a new app in Rails, and every now and then I get an ActiveRecord error, I cannot reproduce exactly what triggers it, hope you can help me, or give me tips on debugging this kind of stuff. This time I got the error reporting page, but normally I would just see the 500.html page, with no info about what went wrong. This is the error (it''s the complete
2006 Jun 15
6
Sqlite3 test fails in Rails app
Greetings: I am using Sqlite3 database with my Rails app. When I try and run "rake tests" for the app it always fails with the error: ** Invoke default (first_time) ** Invoke test (first_time) ** Execute test ** Invoke test:units (first_time) ** Invoke db:test:prepare (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:test:prepare ** Invoke