bdd

using jbehave to export stories to html

家住魔仙堡 提交于 2019-12-23 04:20:13
问题 I have a directory tree organised with stories, where stories are grouped by their functional responsibilities, e.g. C:\specifications | + myproject | |- admin stories | |- account_management.story | +- finance_management.story | +- customer stories |- pay_bils.story +- update_details.story There are hundreds of features and stories, so it's difficult to get a high level view of the functionality. Question: Does JBehave enable you to convert the text based stories into a more readable format,

Integrating Codeigniter 2 with phpspec2

江枫思渺然 提交于 2019-12-23 03:14:11
问题 I want to integrate phpspec2 with CodeIgniter 2. I've succesfully installed phpspec using composer as described on phpspec website. Now I'd like to integrate it into my CodeIgniter 2 installation. I've found an article by AniDear on this subject and did everything as described. However when I run bin/phpspec I get an error: PHP Warning: require(core/Common.php): failed to open stream: No such file or directory in C:\xampp\htdocs\eljotengine\spec\ci_bootstrap.php on line 37 Warning: require

How to test google analytics (garb) API with Rspec?

99封情书 提交于 2019-12-22 12:37:59
问题 I'm using the garb gem to pull some basic stats, like pageviews, from Google Analytics. Everything's working correctly but I can't figure out the best way to test my API calls. Here's a paired down version of my Analytics class: class Analytics extend Garb::Model metrics :pageviews dimensions :page_path Username = 'username' Password = 'password' WebPropertyId = 'XX-XXXXXXX-X' # Start a session with google analytics. # Garb::Session.login(Username, Password) # Find the correct web property. #

Reusable/Generic Examples table in Cucumber

岁酱吖の 提交于 2019-12-22 11:23:58
问题 Is it possible for multiple scenarios to use the same Examples table? So instead of having something like the following: Scenario Outline: First Scenario Given I am viewing "<url>" Then I assert that the current URL "<url>" Examples: | url | | https://google.com | | https://twitter.com| Scenario Outline: Second Scenario Given I am viewing "<url>" with route "</contactus>" Then I assert that "<url>" contains "contactus" Examples: | url | | https://google.com | | https://twitter.com| I can do

Strange ordering of Kiwi iOS context blocks

妖精的绣舞 提交于 2019-12-22 09:47:42
问题 I have a Kiwi spec file that looks something like this: #import "Kiwi.h" #import "MyCollection.h" SPEC_BEGIN(CollectionSpec) describe(@"Collection starting with no objects", ^{ MyCollection *collection = [MyCollection new]; context(@"then adding 1 object", ^{ MyObject *object = [MyObject new]; [collection addObject:object]; it(@"has 1 object", ^{ [collection shouldNotBeNil]; [collection.objects shouldNotBeNil]; [[theValue(collection.objects.count) should] equal:theValue(1)]; //failing test })

Is there a BDD solution that presently works well with iOS4 and Xcode4?

梦想的初衷 提交于 2019-12-22 09:07:23
问题 So I've been searching pretty hard for a solid BDD alternative for iOS4 and Xcode4, but everything seems to have either been abandoned a long time ago or sortof working but rather messily. The best solution I've found is called Cedar (main article with a link to a recently updated project tracker), though it has some issues with Xcode4 involving a messy workaround, as noted here. Does anyone know of a better solution? Thanks! EDIT: I decided on using OCUnit and mushing the BDD syntax into the

how to test or describe endless possibilities?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 04:28:08
问题 Example class in pseudocode: class SumCalculator method calculate(int1, int2) returns int What is a good way to test this? In other words how should I describe the behavior I need? test1: canDetermineSumOfTwoIntegers or test2: returnsSumOfTwoIntegers or test3: knowsFivePlusThreeIsEight Test1 and Test2 seem vague and it would need to test a specific calculation, so it doesn't really describe what is being tested. Yet test3 is very limited. What is a good way to test such classes? 回答1: I would

How to stub require() / expect calls to the “root” function of a module?

 ̄綄美尐妖づ 提交于 2019-12-22 04:13:10
问题 Consider the following jasmine spec: describe("something.act()", function() { it("calls some function of my module", function() { var mod = require('my_module'); spyOn(mod, "someFunction"); something.act(); expect(mod.someFunction).toHaveBeenCalled(); }); }); This is working perfectly fine. Something like this makes it green: something.act = function() { require('my_module').someFunction(); }; Now have a look at this one: describe("something.act()", function() { it("calls the 'root' function

How far can you go with JavaScript testing?

不打扰是莪最后的温柔 提交于 2019-12-21 20:16:13
问题 I'm somewhat informed with TDD and BDD with Ruby/Rails, but I will eventually need to use some form of testing with my JavaScript code. I use MooTools as a JS framework and I absolutely love how well I can organize and modularize my code with its codebase. But, sometimes, when I add new features to my application, I find that the functionality can easily break from how it worked before. When it comes to testing JavaScrtpt code, does the testing itself fall short of user interaction? Is it

How to debug in Visual Studio with NSpec

回眸只為那壹抹淺笑 提交于 2019-12-21 19:45:27
问题 how do I debug in visual studio with NSpec? I've resharper installed I need to step into my test code. 回答1: At least in Visual Studio 2013, the NSpec Test Adapter (by {o} Software) seems to do the trick. Find it in the Extensions gallery. Then just right-click on the test in the Test Explorer and hit Debug. 回答2: Another good option is to just type System.Diagnostics.Debugger.Launch() in the test you want to debug. You'll get a Visual Studio prompt to debug the test. I would also recommend