Class: CucumberFM::Feature
Instance Attribute Summary collapse
Instance Method Summary
collapse
#estimation, #estimation_done, #estimation_done_percentage, #scenarios_done, #scenarios_done_percentage
Instance Attribute Details
#cfm ⇒ Object
Returns the value of attribute cfm
2
3
4
|
# File 'lib/cucumber_f_m/feature.rb', line 2
def cfm
@cfm
end
|
#path ⇒ Object
Returns the value of attribute path
2
3
4
|
# File 'lib/cucumber_f_m/feature.rb', line 2
def path
@path
end
|
Instance Method Details
#<=>(_f) ⇒ Object
63
64
65
|
# File 'lib/cucumber_f_m/feature.rb', line 63
def <=>(_f)
info.title <=> _f.info.title
end
|
#background ⇒ Object
26
27
28
|
# File 'lib/cucumber_f_m/feature.rb', line 26
def background
@background ||= FeatureElement::Background.new(self, scan_for_background_from_raw)
end
|
#destroy ⇒ Object
49
50
51
52
53
|
# File 'lib/cucumber_f_m/feature.rb', line 49
def destroy
File.delete(path)
remove_file_from_repo
push
end
|
#filename ⇒ Object
55
56
57
|
# File 'lib/cucumber_f_m/feature.rb', line 55
def filename
File.basename(path)
end
|
#filename_without_extension ⇒ Object
59
60
61
|
# File 'lib/cucumber_f_m/feature.rb', line 59
def filename_without_extension
File.basename(path, '.feature')
end
|
#id ⇒ Object
6
7
8
|
# File 'lib/cucumber_f_m/feature.rb', line 6
def id
Base64.encode64(relative_path)
end
|
#info ⇒ Object
22
23
24
|
# File 'lib/cucumber_f_m/feature.rb', line 22
def info
@info ||= FeatureElement::Info.new(self, scan_for_feature_info_from_raw)
end
|
#raw ⇒ Object
14
15
16
|
# File 'lib/cucumber_f_m/feature.rb', line 14
def raw
@raw ||= read_content_from_file
end
|
#raw=(content) ⇒ Object
18
19
20
|
# File 'lib/cucumber_f_m/feature.rb', line 18
def raw= content
@raw = content
end
|
#relative_path ⇒ Object
10
11
12
|
# File 'lib/cucumber_f_m/feature.rb', line 10
def relative_path
path.gsub(/^#{cfm.path}\//, '')
end
|
#save ⇒ Object
42
43
44
45
46
47
|
# File 'lib/cucumber_f_m/feature.rb', line 42
def save
write_content_to_file
commit
push
true
end
|
#scenarios ⇒ Object
30
31
32
|
# File 'lib/cucumber_f_m/feature.rb', line 30
def scenarios
@scenarios ||= fetch_scenarios
end
|
34
35
36
|
# File 'lib/cucumber_f_m/feature.rb', line 34
def tags
info.tags
end
|
38
39
40
|
# File 'lib/cucumber_f_m/feature.rb', line 38
def tags_all
scenarios.collect{|scenario| scenario.tags }.flatten.uniq
end
|