Skip to content

Commit 2f46e00

Browse files
committed
one of many
Signed-off-by: Hermann Mayer <[email protected]>
1 parent 47cbdbb commit 2f46e00

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

spec/boltless/result_row_spec.rb

+8-8
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@
100100
end
101101

102102
it 'includes the values' do
103-
expect(action).to include('values=[{:name=>"Klaus"}]')
103+
expect(action).to include(/values=\[{:?name(=>|: )"Klaus"}\]/)
104104
end
105105

106106
it 'includes the meta' do
107-
expect(action).to \
108-
include('meta=[{:id=>146, :type=>"node", :deleted=>false}]')
107+
parts = [':?id(=>|: )146', ':?type(=>|: )"node"', ':?deleted(=>|: )false']
108+
expect(action).to include(/meta=\[{#{parts.join(', ')}}\]/)
109109
end
110110

111111
it 'includes the graph' do
@@ -143,18 +143,18 @@
143143
let(:input) { raw_result_fixture(:with_graph_result) }
144144

145145
it 'includes the graph (key)' do
146-
expect(action).to include('graph={:nodes=>')
146+
expect(action).to include(/graph={:?nodes(=>|: )/)
147147
end
148148

149149
it 'includes the graph (nodes)' do
150-
expect(action).to \
151-
include('[{:id=>"149", :labels=>["User"], ' \
152-
':properties=>{:name=>"Kalle"}}]')
150+
parts = [':?id(=>|: )"149"', ':?labels(=>|: )\["User"\]',
151+
':?properties(=>|: ){:?name(=>|: )"Kalle"}']
152+
expect(action).to include(/\[{#{parts.join(', ')}}\]/)
153153
end
154154

155155
it 'includes the graph (relationships)' do
156156
expect(action).to \
157-
include(':relationships=>[]')
157+
include(/:?relationships(=>|: )\[\]/)
158158
end
159159
end
160160
end

spec/boltless/result_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
end
100100

101101
it 'includes the stats' do
102-
expect(action).to include('stats={:contains_updates=>true')
102+
expect(action).to include(/stats={:?contains_updates(=>|: )true/)
103103
end
104104
end
105105

0 commit comments

Comments
 (0)