Displaying 20 results from an estimated 1000 matches similar to: "Testing & xml"
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
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)
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
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 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 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
2006 May 04
6
second assert_tag failling in rails integration test
Hi all,
I''m fairly new to rails and ruby, but I''ve come across an interesting
glitch and I''m not sure whether I''ve just got something wrong with my
assumptions or if it really is an error in the underlying framework...
I''ve created a bare-bones set of tests to show you where the problem is.
What follows are the steps I went through to reproduce the
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
2005 Nov 23
2
functional tests, assert_tag and tables
I''ve run into another functional testing issue. Odds are I''m taking the
wrong approach, so I''m back to this list again in the hopes of finding
the true path.
with assert_tag, I''d like to check the values of various table cells and
ensure that the proper values are placed in the appropriate places. I
written some tests that make good sense to me, and in
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
2006 Jul 07
2
Testing views with Hpricot
assert_tag smells bad. Hpricot smells nice (apricotty!).
Testing your views with Hpricot:
http://www.lukeredpath.co.uk/index.php/2006/07/07/testing-your-rails-
views-with-hpricot/
Big thanks to _why for a great little library!
Feedback is appreciated. rSpec integration coming soon (hopefully!).
Cheers,
Luke Redpath
contact@lukeredpath.co.uk
-------------- next part --------------
An HTML
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 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
2006 Jun 15
5
[Fwd: Functional test problem]
Anyone?
-------- Original Message --------
Subject: Functional test problem
Date: Wed, 14 Jun 2006 19:49:03 +0100
From: Chris T <ctmailinglists@gmail.com>
Reply-To: ctmailinglists@gmail.com
To: rails@lists.rubyonrails.org
Embarrassingly late (apps already well advanced), have decided top get
to grips with testing and am having a week hopefully covering everything
I''ve
2010 Jul 13
2
[Rspec] Difference between stub and message expectation with any_number_of_times
I''m wondering what''s the difference between stub and message expectation
with any_number_of_times, for example:
myMock = mock("mymock")
myMock.stub!(:is_a?).with(MyClass).and_return(false)
and
myMock = mock("mymock")
myMock.should_receive(:is_a?).with(MyClass).any_number_of_times.and_return(false)
because is_a? may not be called at all, it just like a
2007 Feb 08
3
testing ajax responder actions
I have an Ajax responder method which uses respond_to to make sure it
only works with Ajax. I''m having trouble figuring out how to call this
action successfully. I''m using Rails 1.2.x. Any thoughts?
--
Cheers,
Kevin Williams
http://www.almostserio.us/
"Any sufficiently advanced technology is indistinguishable from
Magic." - Arthur C. Clarke
2006 May 01
1
Radius 0.0.1 -- Powerful Tag-Based Templates
I am pleased to announce the immediate release of Radius 0.5.0.
Radius is a small, but powerful tag-based template language for Ruby
inspired by the template languages used in MovableType
<www.movabletype.org> and TextPattern <www.textpattern.com>. It uses
tags similar to XML, but can be used to generate any form of plain text
(HTML, e-mail, etc...).
This release is much more feature