similar to: should_receive_chain

Displaying 20 results from an estimated 1000 matches similar to: "should_receive_chain"

2011 May 14
1
RSpec stub question
Hi I am using Mongoid. In Mongoid while saving a record we typically give like in the controller @post.safely.save For a model class Post I am writing rspecs for my controller and want to mock the model. So what I am doing is let(:post) { mock_model(Post).as_null_object } before(:each) do Post.stub(:new).and_return(post) end it "creates new post"
2006 Jun 12
5
railish icons?
This is a little off topic but someone here knows, I''m sure... Does anyone have a good site to find freely available standard icons for things like add/edit/delete/save? I''m looking for a set of clean and simple matching icons that capture that Railsy-Web 2.0 feel... Maybe icons aren''t Railsy... Steven -- Posted via http://www.ruby-forum.com/.
2011 Sep 13
12
Assertions for asynchronous behaviour
Hi all, In GOOS[1] they use an assertion called assertEventually which samples the system for a success state until a certain timeout has elapsed. This allows you to synchronise the tests with asynchronous code. Do we have an equivalent of that in the Ruby / RSpec world already? I know capybara has wait_until { } but that''s fairly rudimentary - the failure message isn''t very
2012 Aug 31
5
Question1 Cucumber Rails
can we write multiple background in one feature file....? can we write multiple feature in one feature file.....? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2015 Jan 08
2
[LLVMdev] Separating loop nests based on profile information?
> On Jan 7, 2015, at 5:33 PM, Chandler Carruth <chandlerc at google.com> wrote: > > > On Wed, Jan 7, 2015 at 5:19 PM, Philip Reames <listmail at philipreames.com <mailto:listmail at philipreames.com>> wrote: > I've been playing with approaches to getting better optimization of loops which contain infrequently executed slow paths. I've gotten as far as
2015 Jan 08
9
[LLVMdev] Separating loop nests based on profile information?
I've been playing with approaches to getting better optimization of loops which contain infrequently executed slow paths. I've gotten as far as throwing together a proof of concept implementation of a profile guided optimization to separate a single loop with multiple latches into a loop nest, but I want to get feedback from interested parties before investing much more effort. The
2011 Dec 05
5
Spec'ing a block
Hi folks How would you spec something like this: as_user username do FileUtils.chmod_R 0755, "#{directory}/*" end Where as_user fires off a new process (and set uid to username). It seems that this won''t catch FileUtils.chmod_R: FileUtils.should_receive(:chmod_R).with(0755, "#{@domain.directory}/*") I guess that is because it is passed in the block
2011 Sep 08
2
rspec and testing IO
I have a class that expects some input via ''gets''. I found that, when testing, I can do something as simple as this: @foo.stub!(:gets) { "stuff\n" } However that only works in the most simple case. In my case the class asks a series of questions that require a yes/no answer culminating in some end state. The class then asks if the user would like to go through the
2012 Feb 05
4
testing framework for test automation
Hello, Anyone working in QA Test Automation with RSpec wouldn?t mind posting their testing framework or know where I can go to get more info on testing frameworks either with RSpec or Cucumber? I greatly appreciate. Thank you.
2011 Oct 18
8
rspec 1.3.2, Rails 2.3.14 - plugins not loading
Hi there I have a weird situation. I have inherited a project in Rails 1.2.3 that has been upgraded to Rails 2.3.14 (and is running). I have installed Cucumber and Rspec to start to write features/tests for the new code that needs to be written. In my Gemfile, these Gems are loaded: group :test do gem ''rspec-rails'', ''~> 1.3.4'', :require =>
2008 Apr 15
2
environment.rb uninitialized constant when starting console
I have the following code in environment.rb: require File.join(File.dirname(__FILE__), ''boot'') raw_config = File.read(RAILS_ROOT + "/config/config.yml") APP_CONFIG = YAML.load(raw_config)[RAILS_ENV] This works fine when running the server, but if I try and start a console I get: Loading development environment.
2007 Apr 01
5
On Topic: Cheapest Asterisk USB Key? (was: Re: Off Topic: Open Source USB Softphone)
Here's a flipside of this subject: what is the absolute cheapest Linux device that can be connected to a PC's USB port? That has just enough power for a minimal Asterisk server running on it. The Asterisk just maintains a CDR database on its Flash memory, which it periodically submits over the PC's network connection with an HTTP hit on a remote full-service Asterisk server? No call
2006 Jun 20
8
Integrating multiple applications
I''ve got a couple apps that I use (billing app, support ticket app, some other custom apps) that I want to integrate into one site. They will all use the same layout for the most part, and will link between each other. When I initially thought of doing this, I figured if I put the apps at different roots - /billing /support etc - then the links wouldn''t work at all, because
2006 Aug 12
1
has and belongs to many different?
Is there such a thing? I am thinking of an application that has something like this: 1. person has many things - there is a ''persons'' table 2. the things he has are stored in a table that is something like this person_id, thing_table_name, thing_id For example, it may map to person1, books, 23 #Person 1 owns book 23 person1, books, 25 #Person 1 owns book 25
2006 Jul 20
2
workweek_select
I''m having difficulty figuring out the ruby neccessary to do this so I thought I would try the list. I''m hoping to get a date_select to only display certain days (specifically only fridays) but rails doesn''t seem to have the flexibility so I''ve been going at it in ruby to no avail. I''ve looked on google but couldn''t find it (because it
2009 Jul 06
8
how to make ZenTest autotest run whenever my tests change
Railsters: Despite Rails being the only Web platform designed for TDD, a lot of its test infrastructure is still "cargo cult" - imitating other test rigs instead of understanding their principles. Most importantly, tests should run instantly. There''s no excuse for breaking this rule, and if you invent a platform that can''t obey it then you are doing something
2006 Jan 25
1
BroadVoice subscribers and Asterisk 1.2.3
I just upgraded a box to 1.2.3 this morning after encountering the issues noted earlier on the list. Everything is great. In fact, a LOT better. In the past few weeks, I've been battling with BV to address dropped outgoing voice packets (the flipside is that I haven't experienced this with other providers during tests), and an annoying mechnical 'chirp' at the start of a call.
2011 Jul 29
2
How can I make before/after all a method?
I would like to turn this: describe TestClass do before :all do # set some config end after :all do # restore some config end # do a bunch of tests to this end into describe TestClass do with_config_value(X) # do a bunch of tests to this end Basically, I want to include before :all and after :all clauses into a test. However, I do not want this to apply toa ll tests. Thanks in advance.
2012 Jun 14
3
Selenium+Autotest: how to run browser in background?
Hey guys After hours of hard work I finally managed to set up my development environment to run cucumber scenarios using autotest and selenium. What''s a bit bugging is the fact that Firefox always jumps to the foreground when Autotest does its job. How can I keep Firefox in the background so that I can continue with my work without being interrupted? Thanks! -- Posted via
2001 Oct 25
1
MP3PRO
And thats only a player. What about an (Open Source) encoder? Nah, I'll stick with OGG for the time being. Regards, Mark -- Mark de Bokx Internet Service Engineer ICT Communication and Media Services PlanetMediaGroup the Netherlands "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty not safety." --Benjamin Franklin