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
1
vote
0 answers

Kiwi not calling stubbed class method

I'm writing some Kiwi specs to test the authentication system in my app, specifically loading a set of stored credentials. The example works by stubbing methods in NSUserDefaults and SSKeychain to return fixed data, which the authentication class…
rpowell
  • 1,464
  • 2
  • 16
  • 29
1
vote
0 answers

iOS Nocilla expect a request to have a header

I'm using Nocilla along with Kiwi and I need a test that verifies that the my network client correctly sets given a HTTP header to the request under certain circumstances. How can I do that? cheers, Jan
Jan
  • 7,444
  • 9
  • 50
  • 74
1
vote
1 answer

iOS Kiwi test case with error passed via reference

let's say we have: - (NSString *)someMethod:(NSString *)input { NSError *error = nil; NSString *result = [otherObject processInput:input error:&error]; if (error == nil) { return result; } else { …
1
vote
0 answers

Getting `**TEST SUCCEEDED**` from `xcodebuild` even with failed tests

I'm running this command to run my tests: xcodebuild -workspace WORKSOPACE.xcworkspace -scheme MY_SCHEME -sdk iphonesimulator -arch i386 -configuration Debug clean build test I'm getting this output in the end when I have failing tests: Test Suite…
ShayDavidson
  • 717
  • 1
  • 7
  • 20
1
vote
0 answers

expectFutureValue fails

Why I can't pass test? Any blocks of AFHTTPRequestOperation not called. Seems that expectFutureValue don't wait results and returns immediately. I trying on XCode 6.1 and Kiwi 2.3.1 Thanks! context(@"AFNetworking", ^{ it(@"stubs a request with…
toohtik
  • 1,892
  • 11
  • 27
1
vote
1 answer

Took me two hours to TDD some code that should have taken half an hour. Is this ok?

I'm diving into the TDD world for iOS development. Been reading a lot, watching some screencasts, and overall convincing myself of the power of TDD. But I lack the experience so I just started with a little project. The thing is that it takes me…
Andres C
  • 463
  • 6
  • 26
1
vote
1 answer

OS X server for launching Unit Test remotly

We have a various of choice to use remote OSX Server like MacinCloud, MacStadium, vmOSX, Xcloud, Xcodeclub I want to use Kiwi. If anyone can suggest I would be appriciate
Svitlana
  • 2,938
  • 1
  • 29
  • 38
1
vote
1 answer

How to automate testing of different launch options in iOS app?

I was wondering if there was a way to automate testing of different configurations of launchOptions when the app first launches? I am familiar with XCTest, KIF and KIWI but I'm not sure if it's possible to implement that sort of tests?
ken
  • 3,897
  • 3
  • 22
  • 28
1
vote
1 answer

iOS Test Reports from Kiwi on TeamCity

I'm looking into capturing test reports on TeamCity. The iOS testing framework being used is Kiwi, and I was wondering if the tool xcpretty would be able to capture Kiwi's output? https://github.com/supermarin/xcpretty
SHEADYguy
  • 11
  • 2
1
vote
0 answers

How to test an attribute when using KiWi in iOS?

I'm learning how to following TDD using KiWi Framework, my first problem so far is about how can I ask for an existing atributte into a UIViewController class, something like this: it(@"should have ",^{ UILabel *descriptionLabel = (UILabel…
kinejara
  • 59
  • 1
  • 5
1
vote
0 answers

Equivalent to raw_input in Kiwi?

I have some experience with Python but I'm new to Kiwi. Can someone please provide me an example of a code for a program in which the user gives an input (like in Python's "raw_input") and after pressing a button the program prints a response using…
1
vote
2 answers

iOS Kiwi parameterized test like NUnit

Is there a way to parameterize test with Kiwi ? If you are familiar with NUnit, it has a feature of running a test with parameters ( see http://www.nunit.org/index.php?p=testCase&r=2.5 ).
Daniel
  • 1,225
  • 2
  • 15
  • 31
1
vote
1 answer

Run specific focused Kiwi 'context' or 'it' element from AppCode?

Often when developing or fixing broken test you need to focus only on one. Is it possible to run only one specific Kiwi context or it element from JetBrains AppCode (not whole spec)? And if so, how to create configuration to accomplish this?
Vadim
  • 167
  • 1
  • 12
1
vote
1 answer

In Objective-C, is it bad practice to have your delegate conform to multiple protocols?

Is this bad practice? @property (nonatomic, weak) NSObject *delegate; I'm trying to test something using the Kiwi framework by mocking this delegate that conforms to two protocols. However, it appears this…
abc123
  • 8,043
  • 7
  • 49
  • 80
1
vote
1 answer

Bizzarre behaviour on Kiwi BDD Mock

I'm using Kiwi to test some classes and I need to stub a class method just to return a fake file path. I know that i can solve exposing some path property or create a subclass just for test, but i prefere to keep only one class and stub some…
IgnazioC
  • 4,554
  • 4
  • 33
  • 46
1 2 3
8 9