search for: aviewfromafar

Displaying 20 results from an estimated 49 matches for "aviewfromafar".

2007 Oct 28
4
A better way to stub out constants
...rather than using global constants). Is this a good idea? Alternatively, am I better using unless const_defined? to avoid redefining them, or perhaps silencing errors somehow? Either of these will still dirty the namespace though. Better ideas welcome! Thanks Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2007 Oct 21
10
Preferred mock framework
...39;m sure I read here that RSpec mocks will be maintained for RSpec''s own specs. (Corrections accepted...) If that is the case, surely they will remain good enough for use with application code? I just don''t know what to use for mocking any more... Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2007 Oct 24
3
How do you specify a rubygem is being required?
...") SqliteConnection.new end end but fails with this: Mock ''Object'' expected :require with ("sqlite3") but received it with ("sqlite3/database") (!!!) I''m at a loss, I hope someone can help Thanks Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2007 Oct 31
5
Rspec Release Plan (was Am I missing something with Heckle?)
On Oct 31, 2007 11:36 AM, Scott Taylor <mailing_lists at railsnewbie.com> wrote: > When can we expect the next release of rspec? Definitely by the end of November. Likely by mid-November. Hopefully in a matter of days. The next release will be 1.1.0. We''re going to a release model in which 1.odd.x will be considered experimental. This means that while we will document
2008 May 27
8
new --pattern option
Hello. You''re saying that: To get rspec to behave as it did before this change, use this: --pattern "**/*.rb" I tried like this (rspec 1.03) and it wasn''t same as before (rspec 1.08). Now it also loads all other files in current directory and in all subdirectories and not only from directory and subdirectories given to spec as a parameter. So, for example, I have
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do foo.should (be_nil || be_empty) in rspec. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2007 Oct 31
16
Am I missing something with Heckle?
...********************** *** Cow#moo loaded with 1 possible mutations ********************************************************************** 1 mutations remaining... No mutants survived. Cool! What''s going on? None of this is behaviour I expect. Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2007 Oct 23
10
How is everyone structuring stories?
...ew( File.expand_path(__FILE__).gsub("_story_spec.rb", ".story") ) in the former. Simple to make TextMate recognise the RSpec files (even though they aren''t, as such) and to give an extension to the stories. Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2008 May 20
4
mock_model not stubbing model attribtues in view spec
Hi -- I am just getting to grips w/ view specs, and am having an issue with mock_model not stubbing the mocked model''s attributes. For instance, I have the following: <CODE> before do @input_timesheet = mock_model( InputTimesheet ) assigns[:input_timesheet] = @input_timesheet end it "should display a table element" do render
2007 Oct 17
15
Any tips on teaching BDD with RSpec?
...n through the experience of teaching BDD (RSpec or otherwise) from scratch and may be able to point me in the right direction. Thanks for any advice Ashley PS I haven''t told him to subscribe to this list yet, so I''m safe to talk about him for a bit :o) -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ work
2008 Apr 29
5
Sharing: dont_repeat_yourself plugin custom RSpec matcher
I wrote a Rails plugin which uses simian to look for duplicates lines in your code and reports in html format, Textmate or Netbeans. I wrote it using RSpec and I have included a RSpec custom matcher: it { rails_application. with_threshold_of_duplicate_lines(4). should be_DRY } If you use Autotest, your specs will fail the next time you do a nasty copy-paste !!! More details in
2008 May 18
2
Using Hash to mock classes that respond to :
...; @migration_d } What I''m really interested in is what happens to (some of) the four migrations, not the migration graph itself. I just wondered if anyone else did this. Generally doing unusual things is a sign something is amiss. Ashley -- http://www.patchspace.co.uk/ http://aviewfromafar.net/
2007 Oct 21
0
Quick facets hack
Following the discussion earlier, I knocked together a trunk- compatible "facets" monkey-patch, if anyone wants to play with it: <http://aviewfromafar.net/2007/10/21/quick-and-dirty-facets-in-rspec- trunk> It''s simplistic, but it will do for me for the time being. Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2007 Oct 24
3
changes to Story Runner steps
Hi all, The following only affects people who have bravely begun to experiment with the 2 day-old plain text story runner and definable groups of steps. For those who fit that bill, I just committed a few changes that will require you to make changes to your code. The StepMatchers class is now the StepGroup class. The step_matchers methods on PlainTextStoryRunner and StepGroup is now just
2007 Oct 24
1
Alternate File "require" line in TextMate bundle
...(Think I nicked it from some of David''s code) Does the former expose you to loading the spec_helper twice under any circumstances? Just wondered, as I had to check there was nothing going on in my spec_helper that shouldn''t be run more than once Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2007 Nov 01
0
Heckle rake task
...o heckle your whole app and report any failures. Was going to post to the list, as the first version was about 4 lines long, but I''ve embellished it slightly (I got carried away), so decided link to it instead, where you can view it in all its syntax- highlighted glory: <http://aviewfromafar.net/2007/11/1/rake-task-for-heckling-your-specs> Let me know if anyone finds it useful Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2007 Oct 30
1
Facets and/or Nested Describes
I have to confess that I did not know about facets before reading Ashley Moran''s post: http://aviewfromafar.net/2007/10/21/quick-and-dirty-facets-in-rspec-trunk Not knowing about the facets solution, I made a couple of feature requests for nested describes: http://rubyforge.org/tracker/index.php?func=detail&aid=14980&group_id=797&atid=3152 http://rubyforge.org/tracker/index.php?func=detail&a...
2007 Oct 20
3
TextMate bundle in MacroMates repo
...the replies said that the RSpec bundle was now in the MacroMates repo, which it is. Is that an officially handled thing? If so, what version of the RSpec bundle is being maintained there - CURRENT? It''s confusing having it available in two locations. Ashley -- blog @ http://aviewfromafar.net/ linked-in @ http://www.linkedin.com/in/ashleymoran currently @ home
2008 Dec 02
11
Any plans for Before-feature or Before-all steps in Cucumber?
...Are there any plans to add BeforeStory or BeforeAll blocks to Cucumber? With this I could start everything once and add reset code to each daemon. Ashley [1] http://blog.phusion.nl/2008/08/25/daemon_controller-a-library-for-robust-daemon-management/ -- http://www.patchspace.co.uk/ http://aviewfromafar.net/
2008 May 23
3
RailsExampleGroup
So I have a describe which is a subclass of RailsExampleGroup. I inserted some data into my database, and reconnect! my connection. Before reconnect, finding the data I just created is fine. The data cannot be found, after reconnection, the data is gone. It''s not in the database. It looks to me the data is not actually inserted into the DB at all, just somehow buffered somewhere. Would