Questions tagged [kiwi]

Kiwi is a Behavior Driven Development library for iOS development. The goal is to provide a BDD library that is exquisitely simple to setup and use.

Kiwi is a Behavior Driven Development library for iOS development. The goal is to provide a BDD library that is exquisitely simple to setup and use.

It's syntax is inspired from Ruby's unit testing framework Rspec.

126 questions
2
votes
0 answers

AFNetworking.h file not found when building for tests?

I am working on an iOS project which was using AFNetworking v1.3.1 without an issue. Recently, we decided not to support iOS 5.0 any more and updated the project to support iOS 6.0 and also pod versions accordingly. I have migrated the project to…
sercancici
  • 77
  • 1
  • 12
2
votes
1 answer

Default context is nil when testing MagicalRecord objects with Kiwi

I have two specs written in Kiwi, both of which call these two methods in beforeAll: [MagicalRecord setDefaultModelFromClass:[self class]]; [MagicalRecord setupCoreDataStackWithInMemoryStore]; And [MagicalRecord cleanUp]; in afterAll. One of these…
Mike Buss
  • 980
  • 9
  • 25
2
votes
0 answers

Kiwi test of ReactiveCocoa produce EXC_BAD_ACCESS

I'm trying to test ReactiveCocoa code with Kiwi framework. Here is code : -(void)bindParentModel:(FEPVehiclePropertyModel*)theParentModel{ self.parentModel = theParentModel; [RACObserve(self, parentModel.currentName) subscribeNext:^(NSString*…
Andrew
  • 573
  • 2
  • 6
  • 18
2
votes
1 answer

iOS Kiwi/Nocilla Tests not calling blocks

I am trying to get familar with the Kiwi BDD testing framework. I am using it it in conjuction with Nocilla to mock HTTP requests. Both projects look awesome but I am having some difficulty with it. I have the following test spec: beforeAll(^{…
Nick
  • 19,198
  • 51
  • 185
  • 312
2
votes
1 answer

how do I serialize\deserialize NSLocale correctly?

I'm trying to implement the protocol for one of my classes. I've come across a problem while seralizing\deseralizing one of the property of this class. The property is of type: NSLocale. Here a (Kiwi) test I wrote to understand the…
lucaconlaq
  • 1,511
  • 4
  • 19
  • 36
2
votes
0 answers

Kiwi asynchronous test raises EXC_BAD_ACCESS

I have a Kiwi test performed. Once in 4 runs it raises EXC_BAD_ACCESS exception. What could be the cause of this? It stops in the middle of first asynchronous test with expectFutureValue invoked. What could go wrong? This is the…
pro_metedor
  • 1,176
  • 10
  • 17
2
votes
2 answers

MagicalRecord MR_createInContext: returns nil

I have a following method : +(Group*)groupWithID:(NSString *)idNumber inContext:(NSManagedObjectContext *)context { Group *group = nil; if(idNumber && context) { NSArray *result = [Group MR_findByAttribute:@"idNumber"…
foFox
  • 1,124
  • 1
  • 14
  • 24
2
votes
1 answer

How to set expectations on parameters to mocked methods in Kiwi

Using OCMockito and OCHamcrest, I can set up expectations on the arguments to mocked methods, thusly: [verify(aMockObject) doSomething:allOf(is(instanceOf([NSArray class])), hasCountOf(3U), nil)]; There doesn't seem to be an equivalently simple way…
Cris
  • 1,939
  • 3
  • 23
  • 37
1
vote
1 answer

Kiwi stub isn't working with NSNumber, ends in SIGKILL

I'm not sure if I'm doing it right but I'm trying to stub an NSNumber property on a core data object. Here's my test example: it(@"should say 1 / ? with 1 point", ^{ mockCard = [KWMock nullMockForClass:[Card class]]; …
Christian Schlensker
  • 21,708
  • 19
  • 73
  • 121
1
vote
0 answers

how to import the existing test cases from excel file to kiwi test case Management Tool

I have installed the kiwi tool according to the documentation provided. But i have around 10k test cases to be uploaded to the tool. So i want to upload the test case to the tool by using API.Is there any way to get this task to be…
1
vote
0 answers

Sharing code between multiple Kiwi test files

I have some Kiwi test helper code that is useful across most of my specs. What's a nice way of sharing this code across multiple specs (i.e. multiple files)? A category on KiwiSpec might be one option. But that feels a bit off, since I'd be putting…
occulus
  • 16,959
  • 6
  • 53
  • 76
1
vote
0 answers

How can I test asynchronous delegate methods using Expecta/OCMockito?

I'm currently using Kiwi to write tests, but I'm interested in trying out Specta/Expecta/OCMockito (or another mocking library, if necessary). One thing I use Kiwi for is testing that delegate methods are called after some asynchronous work. For…
MaxGabriel
  • 7,617
  • 4
  • 35
  • 82
1
vote
2 answers

Testing NSNotification in Kiwi iOS

So I need to test whether a NSNotification is posted. I tried the following code to spy on the argument. [[NSNotificationCenter defaultCenter] stub:@selector(postNotification:)]; __block KWCaptureSpy *notificationSpy = [[NSNotificationCenter…
Vig
  • 1,532
  • 1
  • 12
  • 28
1
vote
1 answer

Kiwi unit tests never failing in Xcode

For some reason my tests are passing every time. Even when I add fail(@"failed"); Xcode still says "test succeeded" Any ideas? Heres what my spec looks like #import "SDRViewController.h" #import #import…
MendyK
  • 1,643
  • 1
  • 17
  • 30
1
vote
1 answer

Forcing failure of a Kiwi test

Is there a way to force failure in a Kiwi test, i.e. the equivalent of XCTFail(). I can write something like [@"" should] beNil] that will always fail but I was figuring Kiwi must have something a little more expressive of the developer's intent…
jbelkins
  • 470
  • 3
  • 15
1 2
3
8 9