Displaying 20 results from an estimated 29 matches for "greenprogrammer".
2007 Nov 15
2
Story adapter and SQLite Was:What command to run all stories?
...er_exit_hook''
> from stories/additions/addition.rb:3
> This last part is happening in the at_exit part of Test:Unit
>
> Also, I don''t understand why the scenario''s are pending.
>
> Thanks
> Ed
>
>
>
> --
> Ed Howland
> http://greenprogrammer.blogspot.com
> "The information transmitted is intended only for the person or entity
> to which it is addressed and may contain proprietary, confidential
> and/or legally privileged material. Any review, retransmission,
> dissemination or other use of, or taking of any action in r...
2007 May 10
2
Problem with translator
...school = OldSchool.new
school.add_item ''like ?''
school.collection.should include(''like)?''
end
It works ok if the original line is parenthesized
school.collection.should_include(''like ?'')
Ed
--
Ed Howland
http://greenprogrammer.blogspot.com
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
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 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
2007 Jan 12
2
After upgrade to 0.7.5, specs are now using the development, not the test DB
...an 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 Howland
http://greenprogrammer.blogspot.com
2007 Nov 15
5
What command to run all stories?
...vendor/plugins/rspec/lib/spec/story/runner.rb:41:in
`register_exit_hook''
from stories/additions/addition.rb:3
This last part is happening in the at_exit part of Test:Unit
Also, I don''t understand why the scenario''s are pending.
Thanks
Ed
--
Ed Howland
http://greenprogrammer.blogspot.com
"The information transmitted is intended only for the person or entity
to which it is addressed and may contain proprietary, confidential
and/or legally privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this i...
2008 Jun 02
2
get method under 1.1.4 in Stories is undefined
...:
in my first Given:
@app = ActionController::Integration::Session.new
in some When
@app.get page
or using Webrat:
@aop.visits "/"
@app.fills_in field, :with => value
Anyone els seen this? Why is creating the AIS needed?
Thanks
Ed
.
--
Ed Howland
http://greenprogrammer.blogspot.com
2006 Oct 25
5
Mocha, Stubba and RSpec
...work with Mocha''
wrong number of arguments (0 for 1)
I could not get alias to work (but didn''t try alias_method yet,) so I
just commented out the stub and mock calls in
rspec-0.6.4/lib/spec/runner/execution_context.rb
Is there a better way to do this?
Ed
--
Ed Howland
http://greenprogrammer.blogspot.com
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 Jun 21
3
Sqlite3, in-memory db and rspec_server
...39;
./script/spec_server:44:
Line 5 is the User.new in the before clause.
I have tried this on various versions of things. RSpec 1.0.5, Ubuntu
6.04, Rails 1.2.3, Sqlite 3.2.8, sqlit3-ruby 1.2.1 (gem)
And on Ubuntu 7.04, Sqlite 3.3.13
Same results.
Any ideas?
Thanks
Ed
--
Ed Howland
http://greenprogrammer.blogspot.com
"The information transmitted is intended only for the person or entity
to which it is addressed and may contain proprietary, confidential
and/or legally privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this i...
2006 Jul 24
0
Why doesn''t default_url_options :anchor => ... work for render
...# then default render
In the add.rhtml:
<a name="company">
<%= text_field model, company_name %>
But this doesn''t work. Nor does there seem to be a way to pass an
:anchor to the render method.
Does anyone know a way to do this?
Thanks
Ed
--
Ed Howland
http://greenprogrammer.blogspot.com
2006 May 23
0
RJS replace adding multiple inputs
...value => @company.id
But when I do this, it works but it adds an additional blank <input> tag:
<input>
<input id="client_company_id", name="client[company_id]" value="4"
type="hidden">
Anyone know why?
Ed
--
Ed Howland
http://greenprogrammer.blogspot.com
2006 May 31
0
Help with xhr request in integration tests
...nd to
throw one off (I know that integration tests are new.)
In my views I have either a link_to_remote tag or either a
form_remote_tag or submit_to_remote tag. When integration testing, how
does Rails know whether it is a xhr :get or a xhr :post just from the
path?
Thanks.
--
Ed Howland
http://greenprogrammer.blogspot.com
2007 Nov 20
1
How to represent Story of Life grid in Then clause
...d 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
strings with multiple Then()s getting called or a single string
separated by new lines?
Thanks
Ed
--
Ed Howland
http://greenprogrammer.blogspot.com
"The information transmitted is intended only for the person or entity
to which it is addressed and may contain proprietary, confidential
and/or legally privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this i...
2006 Sep 11
1
Aliasing type method in Mocha
...says it should return. I tried alias
Mocha:Mock :type to :otype in my test and in lib/mocha/mock.rb bot to
no avail. The alias takes, in that s.otype returns "Mocha::Mock" but
the stub method does not really redefine the type method, it stll
returns Mocha::Mock
Ed
--
Ed Howland
http://greenprogrammer.blogspot.com
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
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