Class: TestTrack::Remote::SplitDetail
- Inherits:
-
Object
- Object
- TestTrack::Remote::SplitDetail
- Includes:
- TestTrack::RemoteModel
- Defined in:
- app/models/test_track/remote/split_detail.rb
Class Method Summary collapse
Class Method Details
.fake_instance_attributes(name) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/models/test_track/remote/split_detail.rb', line 17 def self.fake_instance_attributes(name) { name: name, hypothesis: "fake hypothesis", assignment_criteria: "fake criteria for everyone", description: "fake but still good description", owner: "fake owner", location: "fake activity", platform: "mobile", variant_details: fake_variant_details } end |
.fake_variant_details ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/models/test_track/remote/split_detail.rb', line 30 def self.fake_variant_details [ { name: "fake first variant detail", description: "There are FAQ links in a sidebar" }, { name: "fake second variant detail", description: "There are FAQ links in the default footer" } ] end |
.from_name(name) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'app/models/test_track/remote/split_detail.rb', line 8 def self.from_name(name) # TODO: FakeableHer needs to make this faking a feature of `get` if faked? new(fake_instance_attributes(name)) else get("/api/v1/split_details/#{name}") end end |