RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/contentstack/contentstack-ios

Cursor rule

.cursor/rules/testing.mdc

XCTest patterns, unit vs integration-style tests, fixtures, stability

Cursor rules

Quality

63/100

Scores the file, not the repository.

Length

210 words

6 headings · 0 code blocks

Repository

3

— · pushed 5 days ago

Last changed

3 days ago

First indexed 3 days ago.
contentstack/contentstack-ios/.cursor/rules/testing.mdcRawGitHub
1---
2description: XCTest patterns, unit vs integration-style tests, fixtures, stability
3globs:
4 - "ContentstackTest/**/*.{h,m}"
5---
6 
7# Testing Rules – Contentstack iOS CDA SDK
8 
9Apply when writing or editing tests in the **ContentstackTest** target.
10 
11## Test naming and layout
12 
13- **XCTest** case classes: suffix **`Test`** (e.g. `ContentstackMainTest`, `QueryResultTest`, `SyncTest`) matching existing files under **`ContentstackTest/`**.
14- **Test methods:** `- (void)test...` with descriptive names; group related tests with `#pragma mark` sections where the file already uses that style.
15 
16## Unit vs integration-style
17 
18- **Unit-style:** Mock or avoid network where possible; assert parsing, model behavior, and edge cases quickly.
19- **Integration-style:** Tests that call the live CDA require valid credentials—typically via **`config.json`** in the test bundle (see `ContentstackMainTest` and similar). Do not commit real tokens; document required keys for local/CI runs.
20 
21## XCTest usage
22 
23- Use **`XCTAssert*`** macros; use **`XCTestExpectation`** / **`waitForExpectationsWithTimeout:`** for async flows.
24- Use **`setUp`** / **`tearDown`** for fixtures; load JSON or plist resources from **`[NSBundle bundleForClass:[self class]]`** when the project uses bundle resources.
25 
26## Stability
27 
28- Avoid time-dependent assertions unless necessary; prefer reasonable timeouts for network tests.
29- Do not introduce flaky ordering assumptions or shared mutable global state across tests without synchronization.
30 
31## Coverage
32 
33- The **Contentstack** scheme enables code coverage for the **Contentstack** framework target. Add or extend tests when changing production behavior; do not drop coverage for critical paths without replacement tests.
34 

Sections

  • Testing Rules – Contentstack iOS CDA SDK
  • Test naming and layout
  • Unit vs integration-style
  • XCTest usage
  • Stability
  • Coverage

What it covers

testcode-stylearchitecturetesting-strategydo-not

Stack — with the evidence

swift

(0.60)

github-actions

(0.60)

Glob targeting

  • ContentstackTest/**/*.{h,m}

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
contentstack
Language
—
License
—
Archived
no

All configs in this repo

Also in contentstack/contentstack-ios

Diff this repo’s formats

One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
contentstack/contentstack-ios.cursor/rules/code-review.mdc · 3Cursor rulesswiftgithub-actionstestgitsecuritydependencies+148/1003 days ago
contentstack/contentstack-ios.cursor/rules/contentstack-ios-cda.mdc · 3Cursor rulesswiftgithub-actionsstyledo-not55/1003 days ago
contentstack/contentstack-ios.cursor/rules/ios.mdc · 3Cursor rulesswiftgithub-actionsstylearchdocs52/1003 days ago
contentstack/contentstack-iosAGENTS.md · 3AGENTS.mdswiftgithub-actionsdo-notagent-behaviour63/1003 days ago
Diff against .cursor/rules/code-review.mdc Diff against .cursor/rules/contentstack-ios-cda.mdc Diff against .cursor/rules/ios.mdc Diff against AGENTS.md

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
skillrecordings/egghead-next.cursor/rules/gh-task-plan.mdc · 1.4kCursor rulestypescriptnode+14teststylearchtypes+296/1003 days ago
skillrecordings/egghead-next.cursor/rules/project-update-rules.mdc · 1.4kCursor rulestypescriptnode+14buildtestlint-formatstyle+796/1003 days ago
skillrecordings/egghead-next.cursor/rules/project-update-user-rules.mdc · 1.4kCursor rulestypescriptnode+14buildtestlint-formatstyle+796/1003 days ago
hiromaily/go-crypto-wallet.cursor/rules/proto.mdc · 126Cursor rulesgobiome+4buildlint-formatstylearch+396/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack