bdd

Is there a sample Rails application with a number of cucumber stories?

I'm trying to really understand Cucumber stories. I get it, but I'm really slow writing them. I think if I saw a good fleshed out application, I'd get closer to where I want to be. There are some samples out there, but there aren't any I can find with a single app with some non-contrived example stories. Are there any existing ones? ...

Culerity vs Selenium for Javascript Testing in Rails

In our eternal quest to integrate Javascript into our RSpec and Cucumber workflow we're evaluating Culerity and are provisionally very excited about it. Any advice on Culerity in general or specifically as compared to Selenium? ...

How does the "specs" BDD framework for Scala work?

I'm just getting started with Scala, and I'm wondering which language feature allows you to do this: "PersistentQueue" should { "add and remove one item" in { withTempFolder { val q = new PersistentQueue(folderName, "work", Config.fromMap(Map.empty)) q.setup q.length mustEqual 0 q.totalItems mustEqual 0 ...

How do I run my Specs with the previous version of Rspec?

I have been following an RSpec tutorial on one of my machines, in the hope of learning more about BDD and TDD. My setup was with Rails 2.2.2 and Rspec 1.1.12 Tonight I decided to continue on my primary machine and moved my code from my portable to my desktop. Not having RSpec, i installed the gem . . . sudo gem install rspec sudo gem ...

Stubbing Chained Methods with Rspec

I want to call a named_scope that will only return one record, but the named_scope returns an array, that's not a big deal as I can just chain it with .first: Model.named_scope(param).first and this works, what I am struggling with is how to stub the chained call. Does anyone have a reference or an answer on how I would go about achie...

Can Java annotations be unit tested?

I've recently started creating my own annotations and to sport TDD/BDD, I'd want to unit test my annotations to create a clear specification for them. However since annotations are basically merely fancy interfaces which to my knowledge can't be really instantiated directly, is there any way short of reflection to unit test an annotation...

How to start with Rspec?

I have been into rails for the last 3 months. Now I wish to start BDD or TDD. I want to start with RSpec. How do I start with it? ...

Debugging JBehave scenarios

I'm having trouble debugging my jbehave tests. I cannot get maven to start the jbehave tests and stop at a breakpoint. I have this in my pom: <pluginManagement> <plugins> <plugin> <groupId>org.jbehave</groupId> <artifactId>jbehave-maven-plugin</artifactId> <version>2.0.1</version> </plugin> </plugins> </pluginMa...

How to use bdd naming style with Resharper 4.5?

I just upgraded to Resharper 4.5 and now see that all my BDDish test methods are marked as not conforming to the naming standard. My naming convention is like this: public void Something_ShouldHaveThisResult() Resharper doesn't like the underscore in the method. Is there a way to turn this off, just for test methods? I have a norma...

Are BDD tests acceptance tests?

Or, if you have BDD tests, do you need something like Fitnesse? ...

Suggestions for BDD Scenarios for an generic API?

I'm putting together BDD inspired unit tests for the API part of my application. (Yeah, I know, BDD is supposed to be about the domain and talking to the suits, but I'd rather try out BDD on something less visible first) Ordinary use. The developer uses the API methods with ordinary parameter values. Extreme use. The developer invokes...

Way to specing simple model method

Right now I have a model function that is something like this: Class Address def first_line "#{self.building_name} #{self.street_name} #{self.suburb}".squeeze(" ").strip end end My address factory is define like this: Factory.define :address do |f| f.building_name "Alpha" f.street_name "Bravo St" f.suburb "Charlie" end ...

Rails RR Framework: multiple calls for instance_of

I would like write RSpec for my controller using RR. I wrote following code: require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe RegistrationController do it "should work" do #deploy and approve are member functions stub.instance_of(Registration).approve { true } stub.instance_of...

BDD, Specifications, and "Specification Reports" with xUnit.NET?

I am a new, but huge fan, of the BDD approach to software development and "specification". I have been making use of xUnit.NET, Moq, and an extension to xUnit.NET that allows me to perform BDD-style testing (I'm using testing loosely, as its not really so much testing as it is specifying expected behavior). Currently, I run all my tests ...

Assocating BDD Scenarios with results of Silverlight Tests

I work with a team that uses Behaviour Driven Development(BDD) to deliver our applications. We have started delivering Silverlight applications. I would like to associate the agreed BDD Scenarios written in plain text to the results of the automated tests for our silverlight application. So when a scenario is met in the application th...

How to write stories / scenarios in BDD ( Behavior Driven Design )

I am about to use BDD (Behavior Driven Design) for the first time and am trying to get used to this different way of approaching a problem. Can you give some stories / scenarios that you would write for say a simple login application using BDD? For example, from what I have read, it seems that: “When a user enters an invalid user...

Can I override task :environment in test_helper.rb to test rake tasks?

I have a series of rake tasks in a Rakefile which I'd like to test as part of my specs etc. Each task is defined in the form: task :do_somthing => :environment do # Do something with the database here end Where the :environment task sets up an ActiveRecord/DataMapper database connection and classes. I'm not using this as part of Rai...

How to integrate MSpec with MS Build?

Hi, Few days ago I watched a BDD screencast by Rob Conery. In the video he showed how to use MSpec, so I downloaded it and played with the bits. What I want now is to integrate MSpec with MS Build, but I don't know how... I use TFS team build as my CI server - Can you help me to integrate MSpec with MSBuild? Thanks! ...

I created NUnit tests, now how do I run them?

I'm developing in vs2008, c#, .net 3.5. I downloaded NUnit 2.5 win / msi version. I have created a [TestFixture] Class containing several [Test] methods. How do I run the tests? When I run a NUnit demo solution from Ed Ames, his test .cs files have an icon in the grey column to the left of the code (same place where breakpoints, bo...

Book or online resource explaining BDD

The Wikipedia article about Behavior Driven Development gives a nice overview about the topic, and many tools are listed. However, in order to dig deeper and really grasp the mindset of BDD, what other resources are there? Language agnostic material appreciated. ...