Displaying 20 results from an estimated 1000 matches similar to: "Pretty story output for non-Rails project"
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 Nov 15
2
Story adapter and SQLite Was:What command to run all stories?
Hi, by switching to MySQL from SQLite, it fixed the problem. I ran
rdebug on it and it is trying to call
I ActiveRecord::Base.connection.begin_db_transaction. from
ActiveRecordSafetyListener.scenario_started. I don''t think SQLLite
likes transactions.
Ed
On Nov 15, 2007 10:56 AM, Ed Howland <ed.howland at gmail.com> wrote:
> If I run the story stand-alone, I get:
> ruby
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
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
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 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
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 =
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 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 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
2007 Oct 17
15
Any tips on teaching BDD with RSpec?
Hi
I hope this is not OT. I''m training my replacement at work to do BDD
Rails development. He''s done a CS/maths degree but has no
professional programming experience, so he''s never NOT done a project
without BDD. In a way I am jealous of his unspoilt situation :)
I''ve gone about things this way:
* first teach him some Ruby (he did mainly Java at
2007 Oct 11
2
Incompatibility Issues after updating CURRENT
Hi,
I''m using piston to manage rspec and rspec_on_rails in vendor/plugins.
----
~/work/simplify_md $ piston st vendor/plugins/
vendor/plugins/rspec
(svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec)
vendor/plugins/rspec_on_rails
(svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails)
----
After I ''piston update''d rspec and
2007 Oct 24
1
Stubbing Kernel.` (backquote)
I''m trying to stub(!) the Kernel.` (backquote) method and I''m having
confusing (to me) results. Here''s the method I''m spec''ing:
class Barcode
...
def raw_barcodes
self.make_temporary_copy
`OcrBarcode #{self.temp_file_path}`
end
...
end
And this is my (newbish) attempt at the spec:
describe "Calling @barcode.raw_barcodes" do
2007 Oct 13
3
[RSpec] Unexpected behavior using TextMate Bundle...
Howdy,
Why does the bundle NOT work when I do the following:
- Start TextMate
- Open my project
- Open my spec
- Try to run spec and get an error
While the following DOES work:
- Open Terminal
- Locate my project
- Start TextMate via command line (mate .)
- Open my spec
- Try to run spec and it works
Cheers,
Mel
-------------- next part --------------
An HTML attachment was
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
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 20
9
How to test for exceptions
Hi folks,
I''m in the process of converting a Test::Unit functional test to RSpec, but I''ve run into a slight problem. I tried looking through the documentation but I still don''t know what I missed.
Thanks in advance,
Blake
describe VenuesController, "on update" do
before(:each) do
@venue = mock("venue")
2006 May 16
10
Date verus Time class
I''m using the date_select and datetime_select helpers in my view, and
they return Date classes from the params hash.
But how do I work with Date classes, they don''t print human readable
dates or times, Time classes work well I can use strftime("%H:%M") to
print to the screen.
Is it possible to convert a Date to a Time, Ive been tinkering in irb
but have got
2006 Aug 07
1
Testing & xml
Probably dead obvious, but are there any assertions for easing testing
of xml output, both for builder templates (for RSS feed -- something
like a version of assert_tag) and for the new restful stuff.
Couldn''t find anything relevant in the API.
Cheers
Chris
2006 Mar 14
21
Changing default date format in Rails
I''ve spent all day digging through the rails api and postgres-pr on
this, I think it''s time to ask the list.
Postgres stores a Date in YYYY-MM-DD format. My users want the dates
in MM/DD/YYYY format.
Sure, I could explicitly convert it on the app level every place where
a date is displayed, but that seemed like a DRY violation.
I thought I''d be clever and simply